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 /
@nodelib /
fs.walk /
out /
readers /
[ HOME SHELL ]
Name
Size
Permission
Action
async.d.ts
1.12
KB
-rw-r--r--
async.d.ts.map
1.07
KB
-rw-r--r--
async.js
3.13
KB
-rw-r--r--
async.spec.d.ts
52
B
-rw-r--r--
async.spec.d.ts.map
125
B
-rw-r--r--
async.spec.js
7.86
KB
-rw-r--r--
common.d.ts
499
B
-rw-r--r--
common.d.ts.map
559
B
-rw-r--r--
common.js
1.06
KB
-rw-r--r--
common.spec.d.ts
53
B
-rw-r--r--
common.spec.d.ts.map
127
B
-rw-r--r--
common.spec.js
4.07
KB
-rw-r--r--
reader.d.ts
245
B
-rw-r--r--
reader.d.ts.map
306
B
-rw-r--r--
reader.js
369
B
-rw-r--r--
reader.spec.d.ts
53
B
-rw-r--r--
reader.spec.d.ts.map
127
B
-rw-r--r--
reader.spec.js
912
B
-rw-r--r--
sync.d.ts
521
B
-rw-r--r--
sync.d.ts.map
560
B
-rw-r--r--
sync.js
1.9
KB
-rw-r--r--
sync.spec.d.ts
51
B
-rw-r--r--
sync.spec.d.ts.map
123
B
-rw-r--r--
sync.spec.js
4.69
KB
-rw-r--r--
Delete
Unzip
Zip
${this.title}
Close
Code Editor : sync.spec.js
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); const assert = require("assert"); const path = require("path"); const sinon = require("sinon"); const settings_1 = require("../settings"); const tests = require("../tests"); const sync_1 = require("./sync"); class TestReader extends sync_1.default { constructor(_root, _settings = new settings_1.default()) { super(_root, _settings); this._scandir = sinon.stub(); } get scandir() { return this._scandir; } } describe('Readers → Sync', () => { describe('.read', () => { it('should throw an error when the first call of scandir is broken', () => { const reader = new TestReader('non-exist-directory'); reader.scandir.throws(tests.EPERM_ERRNO); assert.throws(() => reader.read(), { code: 'EPERM' }); }); it('should return empty array when the first call of scandir is broken but this error can be suppressed', () => { const settings = new settings_1.default({ errorFilter: (error) => error.code === 'EPERM' }); const reader = new TestReader('non-exist-directory', settings); reader.scandir.throws(tests.EPERM_ERRNO); const actual = reader.read(); assert.deepStrictEqual(actual, []); }); it('should return entries', () => { const reader = new TestReader('directory'); const fakeDirectoryEntry = tests.buildFakeDirectoryEntry(); const fakeFileEntry = tests.buildFakeFileEntry(); reader.scandir.onFirstCall().returns([fakeDirectoryEntry]); reader.scandir.onSecondCall().returns([fakeFileEntry]); const expected = [fakeDirectoryEntry, fakeFileEntry]; const actual = reader.read(); assert.deepStrictEqual(actual, expected); }); it('should push to results only directories', () => { const settings = new settings_1.default({ entryFilter: (entry) => !entry.dirent.isFile() }); const reader = new TestReader('directory', settings); const fakeDirectoryEntry = tests.buildFakeDirectoryEntry(); const fakeFileEntry = tests.buildFakeFileEntry(); reader.scandir.onFirstCall().returns([fakeDirectoryEntry]); reader.scandir.onSecondCall().returns([fakeFileEntry]); const expected = [fakeDirectoryEntry]; const actual = reader.read(); assert.deepStrictEqual(actual, expected); }); it('should do not read root directory', () => { const settings = new settings_1.default({ deepFilter: () => false }); const reader = new TestReader('directory', settings); const fakeDirectoryEntry = tests.buildFakeDirectoryEntry(); const fakeFileEntry = tests.buildFakeFileEntry(); reader.scandir.onFirstCall().returns([fakeDirectoryEntry]); reader.scandir.onSecondCall().returns([fakeFileEntry]); const expected = [fakeDirectoryEntry]; const actual = reader.read(); assert.deepStrictEqual(actual, expected); }); it('should set base path to entry when the `basePath` option is exist', () => { const settings = new settings_1.default({ basePath: 'base' }); const reader = new TestReader('directory', settings); const fakeDirectoryEntry = tests.buildFakeDirectoryEntry(); const fakeFileEntry = tests.buildFakeFileEntry(); reader.scandir.onFirstCall().returns([fakeDirectoryEntry]); reader.scandir.onSecondCall().returns([fakeFileEntry]); const actual = reader.read(); assert.strictEqual(actual[0].path, path.join('base', fakeDirectoryEntry.name)); assert.strictEqual(actual[1].path, path.join('base', 'fake', fakeFileEntry.name)); }); it('should set base path to entry when the `basePath` option is exist and value is an empty string', () => { const settings = new settings_1.default({ basePath: '' }); const reader = new TestReader('directory', settings); const fakeDirectoryEntry = tests.buildFakeDirectoryEntry(); const fakeFileEntry = tests.buildFakeFileEntry(); reader.scandir.onFirstCall().returns([fakeDirectoryEntry]); reader.scandir.onSecondCall().returns([fakeFileEntry]); const actual = reader.read(); assert.strictEqual(actual[0].path, fakeDirectoryEntry.name); assert.strictEqual(actual[1].path, path.join('fake', fakeFileEntry.name)); }); }); });
Close