⚝
One Hat Cyber Team
⚝
Your IP:
216.73.216.1
Server IP:
185.238.29.86
Server:
Linux server2 6.8.12-6-pve #1 SMP PREEMPT_DYNAMIC PMX 6.8.12-6 (2024-12-19T19:05Z) x86_64
Server Software:
nginx/1.18.0
PHP Version:
8.1.31
Buat File
|
Buat Folder
Eksekusi
Dir :
~
/
var
/
www
/
invoice
/
node_modules
/
browserify-optional
/
Edit File: index.js
var astTransform = require('ast-transform'); var astTypes = require('ast-types'); var path = require('path'); var resolve = require('browser-resolve'); module.exports = astTransform(function (file) { if (path.extname(file) !== '.js') return; return function(ast, next) { astTypes.visit(ast, { visitCallExpression: function(path) { var node = path.value; if (node.callee.type !== 'Identifier' || node.callee.name !== 'require' || node.arguments.length < 1 || node.arguments[0].type !== 'Literal') return this.traverse(path); var module = node.arguments[0].value; var p = path; while (p = p.parent) { var parent = p.value; if (parent.type === 'CatchClause') break; if (parent.type === 'TryStatement') { try { resolve.sync(module, { filename: file }); } catch (e) { path.replace({ type: 'CallExpression', arguments: [], callee: { type: 'FunctionExpression', params: [], body: { type: 'BlockStatement', body: [{ type: 'ThrowStatement', argument: { type: 'NewExpression', callee: { type: 'Identifier', name: 'Error' }, arguments: [{ type: 'Literal', value: e.message }] } }] } } }); } break; } } return false; } }); next(null, ast); } });
Simpan