NineSec Team Shell
Server IP : 92.205.26.207  /  Your IP : 216.73.216.16
Web Server : Apache
System : Linux 207.26.205.92.host.secureserver.net 4.18.0-553.60.1.el8_10.x86_64 #1 SMP Thu Jul 10 04:01:16 EDT 2025 x86_64
User : zikryat ( 1002)
PHP Version : 8.3.23
Disable Function : exec,passthru,shell_exec,system
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON
Directory (0755) :  /home/zikryat/public_html/node_modules/delegates/../saslprep/

[  Home  ][  C0mmand  ][  Upload File  ]

Current File : /home/zikryat/public_html/node_modules/delegates/../saslprep/generate-code-points.js
'use strict';

const bitfield = require('sparse-bitfield');
const codePoints = require('./lib/code-points');

const unassigned_code_points = bitfield();
const commonly_mapped_to_nothing = bitfield();
const non_ascii_space_characters = bitfield();
const prohibited_characters = bitfield();
const bidirectional_r_al = bitfield();
const bidirectional_l = bitfield();

/**
 * Iterare over code points and
 * convert it into an buffer.
 * @param {bitfield} bits
 * @param {Array} src
 * @returns {Buffer}
 */
function traverse(bits, src) {
  for (const code of src.keys()) {
    bits.set(code, true);
  }

  const buffer = bits.toBuffer();
  return Buffer.concat([createSize(buffer), buffer]);
}

/**
 * @param {Buffer} buffer
 * @returns {Buffer}
 */
function createSize(buffer) {
  const buf = Buffer.alloc(4);
  buf.writeUInt32BE(buffer.length);

  return buf;
}

const memory = [];

memory.push(
  traverse(unassigned_code_points, codePoints.unassigned_code_points),
  traverse(commonly_mapped_to_nothing, codePoints.commonly_mapped_to_nothing),
  traverse(non_ascii_space_characters, codePoints.non_ASCII_space_characters),
  traverse(prohibited_characters, codePoints.prohibited_characters),
  traverse(bidirectional_r_al, codePoints.bidirectional_r_al),
  traverse(bidirectional_l, codePoints.bidirectional_l)
);

process.stdout.write(Buffer.concat(memory));

NineSec Team - 2022