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

Software: Apache. PHP/8.3.27 

uname -a: Linux pdx1-shared-a4-04 6.6.104-grsec-jammy+ #3 SMP Tue Sep 16 00:28:11 UTC 2025 x86_64 

uid=6659440(dh_z2jmpm) gid=2086089(pg10499364) groups=2086089(pg10499364)  

Safe-mode: OFF (not secure)

/usr/share/nodejs/@nodelib/fs.walk/out/providers/   drwxr-xr-x
Free 709.34 GB of 879.6 GB (80.64%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Self remove    Logout    


Viewing file:     stream.spec.js (2.59 KB)      -rw-r--r--
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const assert = require("assert");
const stream_1 = require("stream");
const sinon = require("sinon");
const settings_1 = require("../settings");
const tests = require("../tests");
const stream_2 = require("./stream");
class TestProvider extends stream_2.default {
    constructor(_root, _settings = new settings_1.default()) {
        super(_root, _settings);
        this._reader = new tests.TestAsyncReader();
        this._stream.emit = sinon.stub();
        this._stream.push = sinon.stub();
    }
    get reader() {
        return this._reader;
    }
    get stream() {
        return this._stream;
    }
}
describe('Providers → Stream', () => {
    describe('.read', () => {
        it('should return stream', () => {
            const provider = new TestProvider('directory');
            const stream = provider.read();
            assert.ok(stream instanceof stream_1.Readable);
        });
        it('should call reader function with correct set of arguments', () => {
            const provider = new TestProvider('directory');
            provider.read();
            assert.ok(provider.reader.read.called);
        });
        it('should re-emit the "error" event from reader', () => {
            const provider = new TestProvider('directory');
            provider.reader.onError.yields(tests.EPERM_ERRNO);
            provider.read();
            assert.deepStrictEqual(provider.stream.emit.args, [['error', tests.EPERM_ERRNO]]);
        });
        it('should call the "push" method with entry value for the "entry" event from reader', () => {
            const provider = new TestProvider('directory');
            const fakeEntry = tests.buildFakeFileEntry();
            provider.reader.onEntry.yields(fakeEntry);
            provider.read();
            assert.deepStrictEqual(provider.stream.push.args, [[fakeEntry]]);
        });
        it('should call the "push" method with "null" value for the "end" event from reader', () => {
            const provider = new TestProvider('directory');
            provider.reader.onEnd.yields();
            provider.read();
            assert.deepStrictEqual(provider.stream.push.args, [[null]]);
        });
        it('should do not destroy reader when it is already destroyed', () => {
            const provider = new TestProvider('directory');
            const stream = provider.read();
            stream.destroy();
            assert.ok(stream.destroyed);
            assert.doesNotThrow(() => stream.destroy());
        });
    });
});

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