Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

problem with dearmor executable #18

Open
Sa1tama228 opened this issue Sep 15, 2024 · 10 comments
Open

problem with dearmor executable #18

Sa1tama228 opened this issue Sep 15, 2024 · 10 comments

Comments

@Sa1tama228
Copy link

here is error:

Traceback (most recent call last):
  File "<frozen runpy>", line 198, in _run_module_as_main
  File "<frozen runpy>", line 88, in _run_code
  File "C:\Users\User\AppData\Local\Programs\Python\Python312\Scripts\dearmor.exe\__main__.py", line 7, in <module>
  File "C:\Users\User\AppData\Local\Programs\Python\Python312\Lib\site-packages\dearmor\__main__.py", line 51, in main_cli
    dearmor_main(parser.parse_args().file)
  File "C:\Users\User\AppData\Local\Programs\Python\Python312\Lib\site-packages\dearmor\__main__.py", line 20, in dearmor_main
    p = subprocess.Popen(
        ^^^^^^^^^^^^^^^^^
  File "C:\Users\User\AppData\Local\Programs\Python\Python312\Lib\subprocess.py", line 1026, in __init__
    self._execute_child(args, executable, preexec_fn, close_fds,
  File "C:\Users\User\AppData\Local\Programs\Python\Python312\Lib\subprocess.py", line 1538, in _execute_child
    hp, ht, pid, tid = _winapi.CreateProcess(executable, args,
                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
OSError: [WinError 193] %1 не является приложением Win32 (Translate: is not Win32)
@Sa1tama228
Copy link
Author

btw the soft that i wanted deobfuscate written in python 3.8 if its important

@ErezAmihud
Copy link
Owner

What is the command line you run?

@Sa1tama228
Copy link
Author

Sa1tama228 commented Sep 16, 2024

What is the command line you run?

just with flag -i, i tried to run it with cmd, ps and pycharm terminal

@ErezAmihud
Copy link
Owner

What is the command line you run?

just with flag -i, i tried to run it with cmd, ps and pycharm terminal

What did you write in the terminal...

@Sa1tama228
Copy link
Author

What is the command line you run?

just with flag -i, i tried to run it with cmd, ps and pycharm terminal

What did you write in the terminal...

dearmor -i main.pyc...

@ErezAmihud
Copy link
Owner

What is the command line you run?

just with flag -i, i tried to run it with cmd, ps and pycharm terminal

What did you write in the terminal...

dearmor -i main.pyc...

Ok so the problem is you tried to run it with pyc and not with py file. To run pyc file you have to have the exact same 0ython version and in the __main__.py file in this repo it is not really supported.
Instead, decompile the pyc to py and then run dearmor

@Sa1tama228
Copy link
Author

ty, ill try and report if smth is wrong

@Sa1tama228
Copy link
Author

now there is something with the pid

`Traceback (most recent call last):
File "C:\Users\danil\AppData\Local\Programs\Python\Python312\Lib\site-packages\psutil_pswindows.py", line 727, in wrapper
return fun(self, *args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\danil\AppData\Local\Programs\Python\Python312\Lib\site-packages\psutil_pswindows.py", line 989, in create_time
_user, _system, created = cext.proc_times(self.pid)
^^^^^^^^^^^^^^^^^^^^^^^^^
ProcessLookupError: [Errno 3] assume no such process (originated from GetExitCodeProcess != STILL_ACTIVE)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "C:\Users\danil\AppData\Local\Programs\Python\Python312\Lib\site-packages\psutil_init_.py", line 355, in init
self.create_time()
File "C:\Users\danil\AppData\Local\Programs\Python\Python312\Lib\site-packages\psutil_init
.py", line 757, in create_time
self._create_time = self._proc.create_time()
^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\danil\AppData\Local\Programs\Python\Python312\Lib\site-packages\psutil_pswindows.py", line 729, in wrapper
raise convert_oserror(err, pid=self.pid, name=self._name)
psutil.NoSuchProcess: process no longer exists (pid=5568)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "", line 198, in run_module_as_main
File "", line 88, in run_code
File "C:\Users\danil\AppData\Local\Programs\Python\Python312\Scripts\dearmor.exe_main
.py", line 7, in
File "C:\Users\danil\AppData\Local\Programs\Python\Python312\Lib\site-packages\dearmor_main
.py", line 51, in main_cli
dearmor_main(parser.parse_args().file)
File "C:\Users\danil\AppData\Local\Programs\Python\Python312\Lib\site-packages\dearmor_main_.py", line 30, in dearmor_main
current_process = psutil.Process(p.pid)
^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\danil\AppData\Local\Programs\Python\Python312\Lib\site-packages\psutil_init_.py", line 319, in init
self.init(pid)
File "C:\Users\danil\AppData\Local\Programs\Python\Python312\Lib\site-packages\psutil_init
.py", line 368, in _init
raise NoSuchProcess(pid, msg=msg)
psutil.NoSuchProcess: process PID not found (pid=5568)`

@ErezAmihud
Copy link
Owner

now there is something with the pid

`Traceback (most recent call last): File "C:\Users\danil\AppData\Local\Programs\Python\Python312\Lib\site-packages\psutil_pswindows.py", line 727, in wrapper return fun(self, *args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\danil\AppData\Local\Programs\Python\Python312\Lib\site-packages\psutil_pswindows.py", line 989, in create_time _user, _system, created = cext.proc_times(self.pid) ^^^^^^^^^^^^^^^^^^^^^^^^^ ProcessLookupError: [Errno 3] assume no such process (originated from GetExitCodeProcess != STILL_ACTIVE)

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "C:\Users\danil\AppData\Local\Programs\Python\Python312\Lib\site-packages\psutil__init__.py", line 355, in init self.create_time() File "C:\Users\danil\AppData\Local\Programs\Python\Python312\Lib\site-packages\psutil__init_.py", line 757, in create_time self._create_time = self._proc.create_time() ^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\danil\AppData\Local\Programs\Python\Python312\Lib\site-packages\psutil_pswindows.py", line 729, in wrapper raise convert_oserror(err, pid=self.pid, name=self._name) psutil.NoSuchProcess: process no longer exists (pid=5568)

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "", line 198, in run_module_as_main File "", line 88, in run_code File "C:\Users\danil\AppData\Local\Programs\Python\Python312\Scripts\dearmor.exe__main.py", line 7, in File "C:\Users\danil\AppData\Local\Programs\Python\Python312\Lib\site-packages\dearmor__main__.py", line 51, in main_cli dearmor_main(parser.parse_args().file) File "C:\Users\danil\AppData\Local\Programs\Python\Python312\Lib\site-packages\dearmor__main__.py", line 30, in dearmor_main current_process = psutil.Process(p.pid) ^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\danil\AppData\Local\Programs\Python\Python312\Lib\site-packages\psutil__init__.py", line 319, in init self.init(pid) File "C:\Users\danil\AppData\Local\Programs\Python\Python312\Lib\site-packages\psutil__init_.py", line 368, in _init raise NoSuchProcess(pid, msg=msg) psutil.NoSuchProcess: process PID not found (pid=5568)`

The python program should run atleast a few seconds - otherwise there is a race condition between the process creation and the attach that happens.
You can clone the repo and change the sleep or remove it to try to do it.

@Sa1tama228
Copy link
Author

now there is something with the pid
Traceback (most recent call last): File "C:\Users\danil\AppData\Local\Programs\Python\Python312\Lib\site-packages\psutil_pswindows.py", line 727, in wrapper return fun(self, *args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\danil\AppData\Local\Programs\Python\Python312\Lib\site-packages\psutil_pswindows.py", line 989, in create_time _user, _system, created = cext.proc_times(self.pid) ^^^^^^^^^^^^^^^^^^^^^^^^^ ProcessLookupError: [Errno 3] assume no such process (originated from GetExitCodeProcess != STILL_ACTIVE) During handling of the above exception, another exception occurred: Traceback (most recent call last): File "C:\Users\danil\AppData\Local\Programs\Python\Python312\Lib\site-packages\psutil__init__.py", line 355, in _init self.create_time() File "C:\Users\danil\AppData\Local\Programs\Python\Python312\Lib\site-packages\psutil__init__.py", line 757, in create_time self._create_time = self._proc.create_time() ^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\danil\AppData\Local\Programs\Python\Python312\Lib\site-packages\psutil_pswindows.py", line 729, in wrapper raise convert_oserror(err, pid=self.pid, name=self._name) psutil.NoSuchProcess: process no longer exists (pid=5568) During handling of the above exception, another exception occurred: Traceback (most recent call last): File "", line 198, in _run_module_as_main File "", line 88, in _run_code File "C:\Users\danil\AppData\Local\Programs\Python\Python312\Scripts\dearmor.exe__main__.py", line 7, in File "C:\Users\danil\AppData\Local\Programs\Python\Python312\Lib\site-packages\dearmor__main__.py", line 51, in main_cli dearmor_main(parser.parse_args().file) File "C:\Users\danil\AppData\Local\Programs\Python\Python312\Lib\site-packages\dearmor__main__.py", line 30, in dearmor_main current_process = psutil.Process(p.pid) ^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\danil\AppData\Local\Programs\Python\Python312\Lib\site-packages\psutil__init__.py", line 319, in **init** self._init(pid) File "C:\Users\danil\AppData\Local\Programs\Python\Python312\Lib\site-packages\psutil__init__.py", line 368, in _init raise NoSuchProcess(pid, msg=msg) psutil.NoSuchProcess: process PID not found (pid=5568)

The python program should run atleast a few seconds - otherwise there is a race condition between the process creation and the attach that happens. You can clone the repo and change the sleep or remove it to try to do it.

and this is the problem, i extracted program with puinstxtractor, and after that the extracted version won't loads properly, it says that: bad magic number in 'pytransform': b'U\r\r\n'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants