Research
Security News
Quasar RAT Disguised as an npm Package for Detecting Vulnerabilities in Ethereum Smart Contracts
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
javaScript var ' powerful dump,不会陷入死循环 ##示例
var test = {
a:'a',
b:'b'
}
test.c = test;
document.write(var_dump(test));
result:
##安装 nodejs
npm install var_dump
###前端
<script src='../var_dump.js'></script>
##使用 前端(browser)
可以遍历 window 对象(除了IE);
document.write(var_dump( //变量 ));
后端(nodejs):
var http = require('http');
var var_dump = require('var_dump.js');
http.createServer(function (req, res) {
res.writeHead(200, {'Content-Type': 'text/html'});
var_dump.init(res);//初始代,只需一次
res.write(var_dump(global));
res.end('Hello World\n');
}).listen(1337, '127.0.0.1');
console.log('Server running at http://127.0.0.1:1337/');
FAQs
Implementation of PHP's var_dump function for JavaScript.
We found that var_dump demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Security News
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
Security News
Research
A supply chain attack on Rspack's npm packages injected cryptomining malware, potentially impacting thousands of developers.
Research
Security News
Socket researchers discovered a malware campaign on npm delivering the Skuld infostealer via typosquatted packages, exposing sensitive data.