Linux ubuntu22 5.15.0-133-generic #144-Ubuntu SMP Fri Feb 7 20:47:38 UTC 2025 x86_64
nginx/1.18.0
: 128.199.27.159 | : 216.73.216.1
Cant Read [ /etc/named.conf ]
8.1.31
www-data
www.github.com/MadExploits
Terminal
AUTO ROOT
Adminer
Backdoor Destroyer
Linux Exploit
Lock Shell
Lock File
Create User
CREATE RDP
PHP Mailer
BACKCONNECT
UNLOCK SHELL
HASH IDENTIFIER
CPANEL RESET
CREATE WP USER
README
+ Create Folder
+ Create File
/
var /
www /
html /
quiz1 /
node_modules /
bfj /
test /
unit /
[ HOME SHELL ]
Name
Size
Permission
Action
datastream.js
2.11
KB
-rw-rw-rw-
error.js
1.76
KB
-rw-rw-rw-
eventify.js
61.83
KB
-rw-rw-rw-
jsonstream.js
2.11
KB
-rw-rw-rw-
match.js
39.34
KB
-rw-rw-rw-
parse.js
34.38
KB
-rw-rw-rw-
read.js
2.65
KB
-rw-rw-rw-
streamify.js
33.71
KB
-rw-rw-rw-
stringify.js
4.98
KB
-rw-rw-rw-
unpipe.js
3
KB
-rw-rw-rw-
walk.js
84.67
KB
-rw-rw-rw-
write.js
6.76
KB
-rw-rw-rw-
Delete
Unzip
Zip
${this.title}
Close
Code Editor : read.js
'use strict' const assert = require('chai').assert const proxyquire = require('proxyquire') const spooks = require('spooks') const modulePath = '../../src/read' suite('read:', () => { test('require does not throw', () => { assert.doesNotThrow(() => { require(modulePath) }) }) test('require returns function', () => { assert.isFunction(require(modulePath)) }) suite('require:', () => { let log, results, read setup(() => { log = {} results = { parse: [ {} ], createReadStream: [ {} ] } read = proxyquire(modulePath, { fs: { createReadStream: spooks.fn({ name: 'createReadStream', log: log, results: results.createReadStream }) }, './parse': spooks.fn({ name: 'parse', log: log, results: results.parse }) }) }) test('read expects two arguments', () => { assert.lengthOf(read, 2) }) test('read does not throw', () => { assert.doesNotThrow(() => { read() }) }) test('parse was not called', () => { assert.strictEqual(log.counts.parse, 0) }) test('fs.createReadStream was not called', () => { assert.strictEqual(log.counts.createReadStream, 0) }) suite('read:', () => { let path, options, result setup(() => { path = {} options = { foo: 'bar', ndjson: true } result = read(path, options) }) test('fs.createReadStream was called once', () => { assert.strictEqual(log.counts.createReadStream, 1) }) test('fs.createReadStream was called correctly', () => { assert.lengthOf(log.args.createReadStream[0], 2) assert.strictEqual(log.args.createReadStream[0][0], path) assert.lengthOf(Object.keys(log.args.createReadStream[0][0]), 0) assert.strictEqual(log.args.createReadStream[0][1], options) assert.lengthOf(Object.keys(log.args.createReadStream[0][1]), 2) }) test('parse was called once', () => { assert.strictEqual(log.counts.parse, 1) }) test('parse was called correctly', () => { assert.isUndefined(log.these.parse[0]) assert.lengthOf(log.args.parse[0], 2) assert.strictEqual(log.args.parse[0][0], results.createReadStream[0]) assert.lengthOf(Object.keys(log.args.parse[0][0]), 0) assert.notStrictEqual(log.args.parse[0][1], options) assert.deepEqual(log.args.parse[0][1], { foo: 'bar', ndjson: false }) }) test('parse result was returned', () => { assert.strictEqual(result, results.parse[0]) }) }) }) })
Close