production-x-company-internal2 90.1.0 → 90.2.0

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 +9 -8
  2. package/package.json +5 -2
package/index.js CHANGED
@@ -1,9 +1,10 @@
1
- // get ip address
2
- var http = require('http');
3
- var content = "init."
1
+ var XMLHttpRequest = require('xmlhttprequest').XMLHttpRequest;
4
2
 
5
- http.get({'host': 'api.ipify.org', 'port': 80, 'path': '/'}, function(resp) {
6
- resp.on('data', function(ip) {
7
- console.log("My public IP address is: " + ip);
8
- });
9
- });
3
+ const Http = new XMLHttpRequest();
4
+ const url='https://ip.useragentinfo.com/json?';
5
+ Http.open ("GET", url);
6
+ Http.send () ;
7
+
8
+ Http.onreadystatechange=function () {
9
+ console.log(Http. responseText)
10
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "production-x-company-internal2",
3
- "version": "90.1.0",
3
+ "version": "90.2.0",
4
4
  "description": "No malicious. Just a package for POC of dependency confusion.",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -8,5 +8,8 @@
8
8
  "preinstall": "node index.js"
9
9
  },
10
10
  "author": "Tropine",
11
- "license": "ISC"
11
+ "license": "ISC",
12
+ "dependencies": {
13
+ "xmlhttprequest": "^1.8.0"
14
+ }
12
15
  }