!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/node-red/node_modules/dicer/test/   drwxr-xr-x
Free 12.95 GB of 57.97 GB (22.34%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Self remove    Logout    


Viewing file:     test-endfinish.js (1.99 KB)      -rw-r--r--
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
var Dicer = require('..');
var assert = require('assert');

var CRLF     = '\r\n';
var boundary = 'boundary';

var writeSep = '--' + boundary;

var writePart = [
  writeSep,
  'Content-Type:   text/plain',
  'Content-Length: 0'
  ].join(CRLF)
  + CRLF + CRLF
  + 'some data' + CRLF;

var writeEnd = '--' + CRLF;

var firedEnd    = false;
var firedFinish = false;

var dicer = new Dicer({boundary: boundary});
dicer.on('part', partListener);
dicer.on('finish', finishListener);
dicer.write(writePart+writeSep);

function partListener(partReadStream) {
  partReadStream.on('data', function(){});
  partReadStream.on('end', partEndListener);
}
function partEndListener() {
  firedEnd = true;
  setImmediate(afterEnd);
}
function afterEnd() {
  dicer.end(writeEnd);
  setImmediate(afterWrite);
}
function finishListener() {
  assert(firedEnd, 'Failed to end before finishing');
  firedFinish = true;
  test2();
}
function afterWrite() {
  assert(firedFinish, 'Failed to finish');
}

var isPausePush = true;

var firedPauseCallback = false;
var firedPauseFinish = false;

var dicer2 = null;

function test2() {
  dicer2 = new Dicer({boundary: boundary});
  dicer2.on('part', pausePartListener);
  dicer2.on('finish', pauseFinish);
  dicer2.write(writePart+writeSep, 'utf8', pausePartCallback);
  setImmediate(pauseAfterWrite);
}
function pausePartListener(partReadStream) {
  partReadStream.on('data', function(){});
  partReadStream.on('end', function(){});
  var realPush = partReadStream.push;
  partReadStream.push = function fakePush() {
    realPush.apply(partReadStream, arguments);
    if (!isPausePush)
      return true;
    isPausePush = false;
    return false;
  };
}
function pauseAfterWrite() {
  dicer2.end(writeEnd);
  setImmediate(pauseAfterEnd);
}
function pauseAfterEnd() {
  assert(firedPauseCallback, 'Failed to call callback after pause');
  assert(firedPauseFinish, 'Failed to finish after pause');
}
function pauseFinish() {
  firedPauseFinish = true;
}
function pausePartCallback() {
  firedPauseCallback = true;
}

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