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 /
filters /
[ HOME SHELL ]
Name
Size
Permission
Action
deep.d.ts
660
B
-rw-r--r--
deep.js
2.41
KB
-rw-r--r--
deep.spec.d.ts
11
B
-rw-r--r--
deep.spec.js
6.4
KB
-rw-r--r--
entry.d.ts
656
B
-rw-r--r--
entry.js
2.19
KB
-rw-r--r--
entry.spec.d.ts
11
B
-rw-r--r--
entry.spec.js
7.54
KB
-rw-r--r--
error.d.ts
265
B
-rw-r--r--
error.js
441
B
-rw-r--r--
error.spec.d.ts
11
B
-rw-r--r--
error.spec.js
1.42
KB
-rw-r--r--
Delete
Unzip
Zip
${this.title}
Close
Code Editor : deep.spec.js
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); const assert = require("assert"); const settings_1 = require("../../settings"); const tests = require("../../tests"); const deep_1 = require("./deep"); const DIRECTORY_ENTRY_LEVEL_1 = tests.entry.builder().path('root').directory().build(); const DIRECTORY_ENTRY_LEVEL_2 = tests.entry.builder().path('root/directory').directory().build(); const DIRECTORY_ENTRY_LEVEL_3 = tests.entry.builder().path('root/nested/directory').directory().build(); function getDeepFilterInstance(options) { const settings = new settings_1.default(options); return new deep_1.default(settings, { dot: settings.dot }); } function getFilter(options) { var _a, _b; const base = (_a = options.base) !== null && _a !== void 0 ? _a : '.'; const negative = (_b = options.negative) !== null && _b !== void 0 ? _b : []; return getDeepFilterInstance(options.options).getFilter(base, options.positive, negative); } function getResult(entry, options) { const filter = getFilter(options); return filter(entry); } function accept(entry, options) { assert.strictEqual(getResult(entry, options), true); } function reject(entry, options) { assert.strictEqual(getResult(entry, options), false); } describe('Providers → Filters → Deep', () => { describe('Constructor', () => { it('should create instance of class', () => { const filter = getDeepFilterInstance(); assert.ok(filter instanceof deep_1.default); }); }); describe('.getFilter', () => { describe('options.deep', () => { it('should reject when an option has "0" as value', () => { reject(DIRECTORY_ENTRY_LEVEL_1, { positive: ['**/*'], options: { deep: 0 } }); }); it('should reject when the depth of entry is greater than an allowable value (without base)', () => { reject(DIRECTORY_ENTRY_LEVEL_3, { positive: ['**/*'], options: { deep: 1 } }); }); it('should reject when the depth of entry is greater than an allowable value (with base as current level)', () => { reject(DIRECTORY_ENTRY_LEVEL_3, { positive: ['**/*'], options: { deep: 1 } }); }); it('should reject when the depth of entry is greater than an allowable value (with nested base)', () => { reject(DIRECTORY_ENTRY_LEVEL_3, { base: 'root/a', positive: ['root/a/*'], options: { deep: 1 } }); }); it('should accept when an option has "Infinity" as value', () => { accept(DIRECTORY_ENTRY_LEVEL_1, { positive: ['**/*'], options: { deep: Infinity } }); }); }); describe('options.followSymbolicLinks', () => { it('should reject when an entry is symbolic link and option is disabled', () => { const entry = tests.entry.builder().path('root').directory().symlink().build(); reject(entry, { positive: ['**/*'], options: { followSymbolicLinks: false } }); }); it('should accept when an entry is symbolic link and option is enabled', () => { const entry = tests.entry.builder().path('root').directory().symlink().build(); accept(entry, { positive: ['**/*'], options: { followSymbolicLinks: true } }); }); }); describe('Positive pattern', () => { it('should reject when an entry does not match to the positive pattern', () => { reject(DIRECTORY_ENTRY_LEVEL_1, { positive: ['non-root/*'] }); }); it('should reject when an entry starts with leading dot and does not match to the positive pattern', () => { const entry = tests.entry.builder().path('./root').directory().build(); reject(entry, { positive: ['non-root/*'] }); }); it('should accept when an entry match to the positive pattern with leading dot', () => { const entry = tests.entry.builder().path('./root').directory().build(); accept(entry, { positive: ['./root/*'] }); }); it('should accept when the positive pattern does not match by level, but the "baseNameMatch" is enabled', () => { accept(DIRECTORY_ENTRY_LEVEL_2, { positive: ['*'], options: { baseNameMatch: true } }); }); it('should accept when the positive pattern has a globstar', () => { accept(DIRECTORY_ENTRY_LEVEL_3, { positive: ['**/*'] }); }); }); describe('Negative pattern', () => { it('should reject when an entry match to the negative pattern', () => { reject(DIRECTORY_ENTRY_LEVEL_2, { positive: ['**/*'], negative: ['root/**'] }); }); it('should accept when the negative pattern has no effect to depth reading', () => { accept(DIRECTORY_ENTRY_LEVEL_3, { positive: ['**/*'], negative: ['**/*'] }); }); it('should accept when an entry does not match to the negative pattern', () => { accept(DIRECTORY_ENTRY_LEVEL_3, { positive: ['**/*'], negative: ['non-root/**/*'] }); }); }); }); describe('Immutability', () => { it('should return the data without changes', () => { const filter = getFilter({ positive: ['**/*'] }); const reference = tests.entry.builder().path('root/directory').directory().build(); const entry = tests.entry.builder().path('root/directory').directory().build(); filter(entry); assert.deepStrictEqual(entry, reference); }); }); });
Close