!C99Shell v. 2.5 [PHP 8 Update] [24.05.2025]!

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)

/usr/local/lib/node_modules/homebridge-config-ui-x/node_modules/text-decoding/build/   drwxr-xr-x
Free 13.16 GB of 57.97 GB (22.7%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Self remove    Logout    


Viewing file:     table.js (3.58 KB)      -rw-r--r--
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
const Encodings = require('./encodings');
const { UTF8Decoder, UTF8Encoder } = require('./implementations/utf8');
const { UTF16Decoder, UTF16Encoder } = require('./implementations/utf16');
const { GB18030Decoder, GB18030Encoder } = require('./implementations/gb18030');
const { Big5Decoder, Big5Encoder } = require('./implementations/big5');
const { EUCJPDecoder, EUCJPEncoder } = require('./implementations/euc-jp');
const { EUCKRDecoder, EUCKREncoder } = require('./implementations/euc-kr');
const { ISO2022JPDecoder, ISO2022JPEncoder } = require('./implementations/iso-2022-jp');
const { XUserDefinedDecoder, XUserDefinedEncoder } = require('./implementations/x-user-defined');
const { ShiftJISDecoder, ShiftJISEncoder } = require('./implementations/shift-jis');
const { SingleByteDecoder, SingleByteEncoder } = require('./implementations/single-byte');
const index = require('./indexes');;

// 5.2 Names and labels

// TODO: Define @typedef for Encoding: {name:string,labels:Array.<string>}
// https://github.com/google/closure-compiler/issues/247


// Label to encoding registry.
/** @type {Object.<string,{name:string,labels:Array.<string>}>} */
const label_to_encoding = {}
Encodings.forEach(({ encodings }) => {
  encodings.forEach((encoding) => {
    encoding.labels.forEach((label) => {
      label_to_encoding[label] = encoding
    })
  })
})

// Registry of of encoder/decoder factories, by encoding name.
const encoders = {
  'UTF-8'() { // 9.1 utf-8
    return new UTF8Encoder()
  },
  'GBK'(options) { // 11.1.2 gbk encoder;
    // gbk's encoder is gb18030's encoder with its gbk flag set.
    return new GB18030Encoder(options, true)
  },
  'gb18030'() {
    return new GB18030Encoder()
  },
  'Big5'() {
    return new Big5Encoder()
  },
  'EUC-JP'() {
    return new EUCJPEncoder()
  },
  'EUC-KR'() {
    return new EUCKREncoder()
  },
  'ISO-2022-JP'() {
    return new ISO2022JPEncoder()
  },
  'UTF-16BE'() { // 15.3 utf-16be
    return new UTF16Encoder(true)
  },
  'UTF-16LE'() { // 15.4 utf-16le
    return new UTF16Encoder()
  },
  'x-user-defined'() {
    return new XUserDefinedEncoder()
  },
  'Shift_JIS'() {
    return new ShiftJISEncoder()
  },
}

/** @type {Object.<string, function({fatal:boolean}): Decoder>} */
const decoders = {
  'UTF-8'(options) { // 9.1.1 utf-8 decoder
    return new UTF8Decoder(options)
  },
  'GBK'(options) { // 11.1.1 gbk decoder;  gbk's decoder is gb18030's decoder.
    return new GB18030Decoder(options)
  },
  'gb18030'(options) {
    return new GB18030Decoder(options)
  },
  'Big5'(options) {
    return new Big5Decoder(options)
  },
  'EUC-JP'(options) {
    return new EUCJPDecoder(options)
  },
  'EUC-KR'(options) {
    return new EUCKRDecoder(options)
  },
  'ISO-2022-JP'(options) {
    return new ISO2022JPDecoder(options)
  },
  'UTF-16BE'(options) { // 15.3.1 utf-16be decoder
    return new UTF16Decoder(true, options)
  },
  'UTF-16LE'(options) { // 15.4.1 utf-16le decoder
    return new UTF16Decoder(false, options)
  },
  'x-user-defined'() {
    return new XUserDefinedDecoder()
  },
  'Shift_JIS'(options) {
    return new ShiftJISDecoder(options)
  },
}

Encodings.forEach(({ heading, encodings }) => {
  if (heading != 'Legacy single-byte encodings')
    return
  encodings.forEach((encoding) => {
    const name = encoding.name
    const idx = index(name.toLowerCase())
    decoders[name] = (options) => {
      return new SingleByteDecoder(idx, options)
    }
    encoders[name] = (options) => {
      return new SingleByteEncoder(idx, options)
    }
  })
})

module.exports.label_to_encoding = label_to_encoding
module.exports.encoders = encoders
module.exports.decoders = decoders

:: Command execute ::

Enter:
 
Select:
 

:: Search ::
  - regexp 

:: Upload ::
 
[ Read-Only ]

:: Make Dir ::
 
[ Read-Only ]
:: Make File ::
 
[ Read-Only ]

:: Go Dir ::
 
:: Go File ::
 

--[ c99shell v. 2.5 [PHP 8 Update] [24.05.2025] | Generation time: 0.0093 ]--