Linux iad1-shared-b7-18 6.6.49-grsec-jammy+ #10 SMP Thu Sep 12 23:23:08 UTC 2024 x86_64
Apache
: 67.205.6.31 | : 216.73.216.13
Cant Read [ /etc/named.conf ]
8.2.29
fernandoquevedo
Terminal
AUTO ROOT
Adminer
Backdoor Destroyer
Linux Exploit
Lock Shell
Lock File
Create User
CREATE RDP
PHP Mailer
BACKCONNECT
UNLOCK SHELL
HASH IDENTIFIER
README
+ Create Folder
+ Create File
/
usr /
share /
nodejs /
fast-glob /
out /
providers /
[ HOME SHELL ]
Name
Size
Permission
Action
filters
[ DIR ]
drwxr-xr-x
matchers
[ DIR ]
drwxr-xr-x
transformers
[ DIR ]
drwxr-xr-x
async.d.ts
470
B
-rw-r--r--
async.js
1013
B
-rw-r--r--
async.spec.d.ts
11
B
-rw-r--r--
async.spec.js
2.86
KB
-rw-r--r--
provider.d.ts
817
B
-rw-r--r--
provider.js
1.95
KB
-rw-r--r--
provider.spec.d.ts
474
B
-rw-r--r--
provider.spec.js
3.74
KB
-rw-r--r--
stream.d.ts
436
B
-rw-r--r--
stream.js
1.17
KB
-rw-r--r--
stream.spec.d.ts
11
B
-rw-r--r--
stream.spec.js
3.64
KB
-rw-r--r--
sync.d.ts
385
B
-rw-r--r--
sync.js
779
B
-rw-r--r--
sync.spec.d.ts
11
B
-rw-r--r--
sync.spec.js
2
KB
-rw-r--r--
Delete
Unzip
Zip
${this.title}
Close
Code Editor : stream.spec.js
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); const assert = require("assert"); const stream_1 = require("stream"); const sinon = require("sinon"); const stream_2 = require("../readers/stream"); const settings_1 = require("../settings"); const tests = require("../tests"); const stream_3 = require("./stream"); class TestProvider extends stream_3.default { constructor(options) { super(new settings_1.default(options)); this._reader = sinon.createStubInstance(stream_2.default); } get reader() { return this._reader; } } function getProvider(options) { return new TestProvider(options); } function getEntries(provider, task, entry) { const reader = new stream_1.PassThrough({ objectMode: true }); provider.reader.dynamic.returns(reader); provider.reader.static.returns(reader); reader.push(entry); reader.push(null); return new Promise((resolve, reject) => { const items = []; const api = provider.read(task); api.on('data', (item) => items.push(item)); api.once('error', reject); api.once('end', () => resolve(items)); }); } describe('Providers → ProviderStream', () => { describe('Constructor', () => { it('should create instance of class', () => { const provider = getProvider(); assert.ok(provider instanceof stream_3.default); }); }); describe('.read', () => { it('should return entries for dynamic entries', async () => { const provider = getProvider(); const task = tests.task.builder().base('.').positive('*').build(); const entry = tests.entry.builder().path('root/file.txt').file().build(); const expected = ['root/file.txt']; const actual = await getEntries(provider, task, entry); assert.strictEqual(provider.reader.dynamic.callCount, 1); assert.deepStrictEqual(actual, expected); }); it('should return entries for static entries', async () => { const provider = getProvider(); const task = tests.task.builder().base('.').static().positive('root/file.txt').build(); const entry = tests.entry.builder().path('root/file.txt').file().build(); const expected = ['root/file.txt']; const actual = await getEntries(provider, task, entry); assert.strictEqual(provider.reader.static.callCount, 1); assert.deepStrictEqual(actual, expected); }); it('should emit error to the transform stream', (done) => { const provider = getProvider(); const task = tests.task.builder().base('.').positive('*').build(); const stream = new stream_1.PassThrough({ read() { stream.emit('error', tests.errno.getEnoent()); } }); provider.reader.dynamic.returns(stream); const actual = provider.read(task); actual.once('error', (error) => { assert.strictEqual(error.code, 'ENOENT'); done(); }); }); it('should destroy source stream when the destination stream is closed', (done) => { const provider = getProvider(); const task = tests.task.builder().base('.').positive('*').build(); const stream = new stream_1.PassThrough(); provider.reader.dynamic.returns(stream); const actual = provider.read(task); actual.once('close', () => { assert.ok(stream.destroyed); done(); }); actual.emit('close'); }); }); });
Close