!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)

/var/www/html/sync/node_modules/fast-xml-parser/src/v6/inputSource/   drwxr-xr-x
Free 13.06 GB of 57.97 GB (22.53%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Self remove    Logout    


Viewing file:     BufferSource.js (3.03 KB)      -rw-r--r--
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
const Constants = {
  space: 32,
  tab: 9
}
export default class BufferSource{
  constructor(bytesArr){
    this.line = 1;
    this.cols = 0;
    this.buffer = bytesArr;
    this.startIndex = 0;
  }



  readCh() {
    return String.fromCharCode(this.buffer[this.startIndex++]);
  }

  readChAt(index) {
    return String.fromCharCode(this.buffer[this.startIndex+index]);
  }

  readStr(n,from){
    if(typeof from === "undefined") from = this.startIndex;
    return this.buffer.slice(from, from + n).toString();
  }

  readUpto(stopStr) {
    const inputLength = this.buffer.length;
    const stopLength = stopStr.length;
    const stopBuffer = Buffer.from(stopStr);

    for (let i = this.startIndex; i < inputLength; i++) {
        let match = true;
        for (let j = 0; j < stopLength; j++) {
            if (this.buffer[i + j] !== stopBuffer[j]) {
                match = false;
                break;
            }
        }

        if (match) {
            const result = this.buffer.slice(this.startIndex, i).toString();
            this.startIndex = i + stopLength;
            return result;
        }
    }

    throw new Error(`Unexpected end of source. Reading '${stopStr}'`);
}

readUptoCloseTag(stopStr) { //stopStr: "</tagname"
    const inputLength = this.buffer.length;
    const stopLength = stopStr.length;
    const stopBuffer = Buffer.from(stopStr);
    let stopIndex = 0;
    //0: non-matching, 1: matching stop string, 2: matching closing
    let match = 0;

    for (let i = this.startIndex; i < inputLength; i++) {
        if(match === 1){//initial part matched
            if(stopIndex === 0) stopIndex = i;
            if(this.buffer[i] === Constants.space || this.buffer[i] === Constants.tab) continue;
            else if(this.buffer[i] === '>'){ //TODO: if it should be equivalent ASCII
                match = 2;
                //tag boundary found
                // this.startIndex
            }
        }else{
            match = 1;
            for (let j = 0; j < stopLength; j++) {
                if (this.buffer[i + j] !== stopBuffer[j]) {
                    match = 0;
                    break;
                }
            }
        }
        if (match === 2) {//matched closing part
            const result = this.buffer.slice(this.startIndex, stopIndex - 1 ).toString();
            this.startIndex = i + 1;
            return result;
        }
    }

    throw new Error(`Unexpected end of source. Reading '${stopStr}'`);
}

  readFromBuffer(n, shouldUpdate) {
    let ch;
    if (n === 1) {
      ch = this.buffer[this.startIndex];
      if (ch === 10) {
        this.line++;
        this.cols = 1;
      } else {
        this.cols++;
      }
      ch = String.fromCharCode(ch);
    } else {
      this.cols += n;
      ch = this.buffer.slice(this.startIndex, this.startIndex + n).toString();
    }
    if (shouldUpdate) this.updateBuffer(n);
    return ch;
  }

  updateBufferBoundary(n = 1) { //n: number of characters read
    this.startIndex += n;
  }

  canRead(n){
    n = n || this.startIndex;
    return this.buffer.length - n + 1 > 0;
  }
  
}

:: 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.0046 ]--