add hw2
This commit is contained in:
11
node_modules/pino/test/fixtures/stdout-hack-protection.js
generated
vendored
Normal file
11
node_modules/pino/test/fixtures/stdout-hack-protection.js
generated
vendored
Normal file
@@ -0,0 +1,11 @@
|
||||
global.process = { __proto__: process, pid: 123456 }
|
||||
|
||||
const write = process.stdout.write.bind(process.stdout)
|
||||
process.stdout.write = function (chunk) {
|
||||
write('hack ' + chunk)
|
||||
}
|
||||
|
||||
Date.now = function () { return 1459875739796 }
|
||||
require('os').hostname = function () { return 'abcdefghijklmnopqr' }
|
||||
const pino = require(require.resolve('../../'))()
|
||||
pino.info('me')
|
||||
Reference in New Issue
Block a user