3ct0s / dystopia-c2

Windows Remote Administration Tool that uses Discord, Telegram and GitHub as C2s
GNU General Public License v3.0
525 stars 120 forks source link

Cannot find Executable for subprocess #11

Closed 3lialka3bee closed 2 years ago

3lialka3bee commented 2 years ago

when i try to build it i get an error:

Traceback (most recent call last): File "builder.py", line 179, in <module> builder.build() File "builder.py", line 43, in build self.compile() File "builder.py", line 50, in compile subprocess.call(compile_command) File "C:\Users\abdul\disctopia-c2\lib\subprocess.py", line 340, in call with Popen(*popenargs, **kwargs) as p: File "C:\Users\abdul\disctopia-c2\lib\subprocess.py", line 858, in init self._execute_child(args, executable, preexec_fn, close_fds, File "C:\Users\abdul\disctopia-c2\lib\subprocess.py", line 1311, in _execute_child hp, ht, pid, tid = _winapi.CreateProcess(executable, args, FileNotFoundError: [WinError 2] The system cannot find the file specified

3ct0s commented 2 years ago

Hey there, thanks for reaching out. Can you please tell me on which platform you are running disctopia? Windows or Linux? Did you go through the installation steps with no errors?

3lialka3bee commented 2 years ago

Am using windows

3ct0s commented 2 years ago

Did you go through the installation steps with no errors?

3lialka3bee commented 2 years ago

yes

affeltrucken commented 2 years ago

Bump. I had this exact error too and I'm using Windows 10.

ustalam commented 2 years ago

Found a fix. Replace the compile function with

def compile(self):
    print(self.BACKDOOR_NAME)
    compile_command = f"pyinstaller --onefile --noconsole --icon=img/exe_file.ico {self.BACKDOOR_NAME}.py"
    subprocess.call(compile_command, shell=True)
    try:
        os.remove(self.BACKDOOR_NAME+".py");os.remove(self.BACKDOOR_NAME+".spec")
    except FileNotFoundError:
        pass