Software: Apache/2.4.41 (Ubuntu). PHP/8.0.30 uname -a: Linux apirnd 5.4.0-204-generic #224-Ubuntu SMP Thu Dec 5 13:38:28 UTC 2024 x86_64 uid=33(www-data) gid=33(www-data) groups=33(www-data) Safe-mode: OFF (not secure) /var/www/html/space/node_modules/b4a/lib/ drwxr-xr-x | |
| Viewing file: Select action/file-type: function byteLength (string) {
return string.length >>> 1
}
function toString (buffer) {
const len = buffer.byteLength
buffer = new DataView(buffer.buffer, buffer.byteOffset, len)
let result = ''
let i = 0
for (let n = len - (len % 4); i < n; i += 4) {
result += buffer.getUint32(i).toString(16).padStart(8, '0')
}
for (; i < len; i++) {
result += buffer.getUint8(i).toString(16).padStart(2, '0')
}
return result
}
function write (buffer, string, offset = 0, length = byteLength(string)) {
const len = Math.min(length, buffer.byteLength - offset)
for (let i = 0; i < len; i++) {
const a = hexValue(string.charCodeAt(i * 2))
const b = hexValue(string.charCodeAt(i * 2 + 1))
if (a === undefined || b === undefined) {
return buffer.subarray(0, i)
}
buffer[offset + i] = (a << 4) | b
}
return len
}
module.exports = {
byteLength,
toString,
write
}
function hexValue (char) {
if (char >= 0x30 && char <= 0x39) return char - 0x30
if (char >= 0x41 && char <= 0x46) return char - 0x41 + 10
if (char >= 0x61 && char <= 0x66) return char - 0x61 + 10
}
|
:: Command execute :: | |
--[ c99shell v. 2.5 [PHP 8 Update] [24.05.2025] | Generation time: 0.0053 ]-- |