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 : entry.spec.js
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); const assert = require("assert"); const path = require("path"); const settings_1 = require("../../settings"); const tests = require("../../tests"); const entry_1 = require("./entry"); const FILE_ENTRY = tests.entry.builder().path('root/file.txt').file().build(); const DIRECTORY_ENTRY = tests.entry.builder().path('root/directory').directory().build(); function getEntryFilterInstance(options) { const settings = new settings_1.default(options); return new entry_1.default(settings, { dot: settings.dot }); } function getFilter(options) { var _a; const negative = (_a = options.negative) !== null && _a !== void 0 ? _a : []; return getEntryFilterInstance(options.options).getFilter(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 → Entry', () => { describe('Constructor', () => { it('should create instance of class', () => { const filter = getEntryFilterInstance(); assert.ok(filter instanceof entry_1.default); }); }); describe('.getFilter', () => { describe('options.unique', () => { it('should do not build the index when an option is disabled', () => { const filterInstance = getEntryFilterInstance({ unique: false }); const filter = filterInstance.getFilter(['**/*'], []); filter(FILE_ENTRY); assert.strictEqual(filterInstance.index.size, 0); }); it('should do not add an entry to the index when an entry does not match to patterns', () => { const filterInstance = getEntryFilterInstance(); const filter = filterInstance.getFilter(['**/*.unrelated-file-extension'], []); filter(FILE_ENTRY); assert.strictEqual(filterInstance.index.size, 0); }); it('should reject a duplicate entry', () => { const filter = getFilter({ positive: ['**/*'] }); filter(FILE_ENTRY); const actual = filter(FILE_ENTRY); assert.ok(!actual); }); it('should accept a duplicate entry when an option is disabled', () => { const filter = getFilter({ positive: ['**/*'], options: { unique: false } }); filter(FILE_ENTRY); const actual = filter(FILE_ENTRY); assert.ok(actual); }); }); describe('options.onlyFiles', () => { it('should reject a directory entry', () => { reject(DIRECTORY_ENTRY, { positive: ['**/*'], options: { onlyFiles: true } }); }); it('should accept a directory entry', () => { accept(DIRECTORY_ENTRY, { positive: ['**/*'], options: { onlyFiles: false } }); }); it('should accept a file entry', () => { accept(FILE_ENTRY, { positive: ['**/*'], options: { onlyFiles: true } }); }); }); describe('options.onlyDirectories', () => { it('should reject a file entry', () => { reject(FILE_ENTRY, { positive: ['**/*'], options: { onlyDirectories: true } }); }); it('should accept a directory entry', () => { accept(DIRECTORY_ENTRY, { positive: ['**/*'], options: { onlyDirectories: true } }); }); }); describe('options.absolute', () => { it('should reject when an entry match to the negative pattern', () => { reject(FILE_ENTRY, { positive: ['**/*'], negative: ['**/*'], options: { absolute: true } }); }); it('should reject when an entry match to the negative pattern with absolute path', () => { const negative = path.posix.join(process.cwd().replace(/\\/g, '/'), '**', '*'); reject(FILE_ENTRY, { positive: ['**/*'], negative: [negative], options: { absolute: true } }); }); it('should accept when an entry does not match to the negative pattern', () => { accept(FILE_ENTRY, { positive: ['**/*'], negative: ['*'], options: { absolute: true } }); }); it('should accept when an entry does not match to the negative pattern with absolute path', () => { const negative = path.posix.join(process.cwd().replace(/\\/g, '/'), 'non-root', '**', '*'); accept(FILE_ENTRY, { positive: ['**/*'], negative: [negative], options: { absolute: true } }); }); }); describe('options.baseNameMatch', () => { it('should reject an entry', () => { reject(FILE_ENTRY, { positive: ['*'], options: { baseNameMatch: false } }); }); it('should accept an entry', () => { accept(FILE_ENTRY, { positive: ['*'], options: { baseNameMatch: true } }); }); }); describe('Pattern', () => { it('should reject when an entry match to the negative pattern', () => { reject(FILE_ENTRY, { positive: ['**/*'], negative: ['**/*'] }); }); it('should reject when an entry does not match to the positive pattern', () => { reject(FILE_ENTRY, { positive: ['*'] }); }); it('should accept when an entry match to the positive pattern with a leading dot', () => { accept(FILE_ENTRY, { positive: ['./**/*'] }); }); it('should accept an entry with a leading dot', () => { const entry = tests.entry.builder().path('./root/file.txt').file().build(); accept(entry, { positive: ['**/*'] }); }); it('should accept when an entry match to the positive pattern', () => { accept(FILE_ENTRY, { positive: ['**/*'] }); }); }); }); describe('Immutability', () => { it('should return the data without changes', () => { const filter = getFilter({ positive: ['**/*'] }); const reference = tests.entry.builder().path('root/file.txt').file().build(); const entry = tests.entry.builder().path('root/file.txt').file().build(); filter(entry); assert.deepStrictEqual(entry, reference); }); }); });
Close