Security News
Research
Data Theft Repackaged: A Case Study in Malicious Wrapper Packages on npm
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
dom-render
Advanced tools
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Title</title>
<script src="../dist/dist/dom-render.js"></script>
</head>
<body>
<div id="body">
<div>
<!--%
for(var i = 0 ; i < this.cnt; i++) {
write(this.name + '--' + i)
}
%-->
</div>
<div>
<!--% write(this.car.name + ' --' + this.car.model)%-->
</div>
</div>
</body>
<script>
console.log('-->', ScopeRawSet)
const body = document.querySelector('#body');
let targetNode = new TargetNode(body, TargetNodeMode.appendChild)
const raw = new ScopeRawSet(body.innerHTML, ['div {color: <!--%write(this.color)%-->}'])
class Test extends ScopeObject {
constructor(config) {
super(config);
this.zz = '22'
console.log('---')
}
say () {
console.log('say~')
}
}
class Person {
constructor() {
this.eat = 'zzz'
this.food = 'food'
}
}
class Wheel {
constructor() {
this.x = 100;
this.y = 500;
}
}
class Car {
constructor() {
this.name = 'car'
this.model = 'tt'
this.leftWheel = new Wheel();
this.rightWheel = this.leftWheel;
// this.rightWheel = new Wheel();
}
}
class User extends Person {
constructor(name, height, width) {
super();
this.cnt = 10;
this.name = name;
this.color = RandomUtils.getRandomColor();
this.height = height;
this.width = width;
this.car = new Car();
this.childs = ['one', 'tow', 'three', 'four'];
}
}
let user = new User('visualkhh', 55, 22);
for (const key in user) {
console.log('target->', key)
}
let config = new Config(document, (it) => new Test(it.config));
console.log(user)
let domRender = new DomRender(raw, config, 'zzzzzzzz');
user = domRender.runRender(user, targetNode);
// user.childs.push('-zzzzzzzzzzzzzzzz')
setTimeout(() => {
user.car.name = 'zzzzzzzzzzzzzzzzzzzzz';
}, 5000)
setTimeout(() => {
user.cnt = 100;
}, 2000)
setInterval(() => {
user.color = RandomUtils.getRandomColor();
},1500)
console.log(user, user.width)
</script>
</html>
FAQs
html view template engine
The npm package dom-render receives a total of 8 weekly downloads. As such, dom-render popularity was classified as not popular.
We found that dom-render demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers 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.
Security News
Research
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
Research
Security News
Attackers used a malicious npm package typosquatting a popular ESLint plugin to steal sensitive data, execute commands, and exploit developer systems.
Security News
The Ultralytics' PyPI Package was compromised four times in one weekend through GitHub Actions cache poisoning and failure to rotate previously compromised API tokens.