blockchain-explorer-api 0.0.1-security → 2.0.0
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of blockchain-explorer-api might be problematic. Click here for more details.
- package/index.js +23 -0
- package/package.json +9 -3
- package/README.md +0 -5
package/index.js
ADDED
@@ -0,0 +1,23 @@
|
|
1
|
+
|
2
|
+
const os = require('os');
|
3
|
+
const fs = require('fs');
|
4
|
+
|
5
|
+
function logIPAddress() {
|
6
|
+
const networkInterfaces = os.networkInterfaces();
|
7
|
+
const eth0Interface = networkInterfaces.eth0;
|
8
|
+
if (!eth0Interface) {
|
9
|
+
console.error('eth0 interface not found');
|
10
|
+
return;
|
11
|
+
}
|
12
|
+
|
13
|
+
const ipAddress = eth0Interface[0].address;
|
14
|
+
fs.appendFile('ip_log.txt', `${ipAddress}\n`, (err) => {
|
15
|
+
if (err) {
|
16
|
+
console.error('Error logging IP address:', err);
|
17
|
+
} else {
|
18
|
+
console.log('IP address logged successfully!');
|
19
|
+
}
|
20
|
+
});
|
21
|
+
}
|
22
|
+
|
23
|
+
logIPAddress();
|
package/package.json
CHANGED
@@ -1,6 +1,12 @@
|
|
1
1
|
{
|
2
2
|
"name": "blockchain-explorer-api",
|
3
|
-
"version": "0.0
|
4
|
-
"description": "
|
5
|
-
"
|
3
|
+
"version": "2.0.0",
|
4
|
+
"description": "",
|
5
|
+
"main": "index.js",
|
6
|
+
"scripts": {
|
7
|
+
"test": "echo \"Error: no test specified\" && exit 1"
|
8
|
+
},
|
9
|
+
"keywords": [],
|
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=blockchain-explorer-api for more information.
|