ErezAmihud / dearmor

This is a repo to deobfuscate pyarmor files
Apache License 2.0
25 stars 7 forks source link

error whilst installing #1

Closed Nqndi closed 2 years ago

Nqndi commented 2 years ago

Hi! I get the following error whilst installing the program. Any idea? D:\another_asztal_backup\reverse_pyarmor\dist\dearmor-master>python setup.py install running install running bdist_egg running egg_info writing dearmor.egg-info\PKG-INFO writing dependency_links to dearmor.egg-info\dependency_links.txt writing entry points to dearmor.egg-info\entry_points.txt writing requirements to dearmor.egg-info\requires.txt writing top-level names to dearmor.egg-info\top_level.txt reading manifest file 'dearmor.egg-info\SOURCES.txt' writing manifest file 'dearmor.egg-info\SOURCES.txt' installing library code to build\bdist.win-amd64\egg running install_lib running build_py creating build creating build\lib.win-amd64-3.7 creating build\lib.win-amd64-3.7\dearmor copying dearmor\code.py -> build\lib.win-amd64-3.7\dearmor copying dearmor__init.py -> build\lib.win-amd64-3.7\dearmor copying dearmor\main__.py -> build\lib.win-amd64-3.7\dearmor running build_ext -- Building for: Visual Studio 16 2019 -- Selecting Windows SDK version 10.0.19041.0 to target Windows 10.0.19043. -- The C compiler identification is MSVC 19.29.30133.0 -- The CXX compiler identification is MSVC 19.29.30133.0 -- Detecting C compiler ABI info -- Detecting C compiler ABI info - done -- Check for working C compiler: C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/VC/Tools/MSVC/14.29.30133/bin/Hostx64/x64/cl.exe - skipped -- Detecting C compile features -- Detecting C compile features - done -- Detecting CXX compiler ABI info -- Detecting CXX compiler ABI info - done -- Check for working CXX compiler: C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/VC/Tools/MSVC/14.29.30133/bin/Hostx64/x64/cl.exe - skipped -- Detecting CXX compile features -- Detecting CXX compile features - done -- Found PythonLibs: C:/Users/Nandi/AppData/Local/Programs/Python/Python39/libs/python39.lib (found version "3.9.0") -- Configuring done -- Generating done -- Build files have been written to: D:/another_asztal_backup/reverse_pyarmor/dist/dearmor-master/build/temp.win-amd64-3.7/Release Microsoft (R) Build Engine version 16.11.0+0538acc04 for .NET Framework Copyright (C) Microsoft Corporation. All rights reserved.

Checking Build System Building Custom Rule D:/another_asztal_backup/reverse_pyarmor/dist/dearmor-master/dearmor-library/CMakeLists.txt sdk.cpp main.cpp Generating Code... dearmor.vcxproj -> D:\another_asztal_backup\reverse_pyarmor\dist\dearmor-master\build\temp.win-amd64-3.7\Release\lib\ dearmor.dll Building Custom Rule D:/another_asztal_backup/reverse_pyarmor/dist/dearmor-master/dearmor-library/CMakeLists.txt creating build\bdist.win-amd64 creating build\bdist.win-amd64\egg creating build\bdist.win-amd64\egg\dearmor copying build\lib.win-amd64-3.7\dearmor\code.py -> build\bdist.win-amd64\egg\dearmor copying build\lib.win-amd64-3.7\dearmor__init.py -> build\bdist.win-amd64\egg\dearmor copying build\lib.win-amd64-3.7\dearmor__main.py -> build\bdist.win-amd64\egg\dearmor Traceback (most recent call last): File "setup.py", line 170, in 'dearmor=dearmor.main__:main_cli', File "C:\Users\Nandi\AppData\Local\Programs\Python\Python37\lib\site-packages\setuptools\init__.py", line 144, in setup return distutils.core.setup(**attrs) File "C:\Users\Nandi\AppData\Local\Programs\Python\Python37\lib\distutils\core.py", line 148, in setup dist.run_commands() File "C:\Users\Nandi\AppData\Local\Programs\Python\Python37\lib\distutils\dist.py", line 966, in run_commands self.run_command(cmd) File "C:\Users\Nandi\AppData\Local\Programs\Python\Python37\lib\distutils\dist.py", line 985, in run_command cmd_obj.run() File "C:\Users\Nandi\AppData\Local\Programs\Python\Python37\lib\site-packages\setuptools\command\install.py", line 67, in run self.do_egg_install() File "C:\Users\Nandi\AppData\Local\Programs\Python\Python37\lib\site-packages\setuptools\command\install.py", line 109, in do_egg_install self.run_command('bdist_egg') File "C:\Users\Nandi\AppData\Local\Programs\Python\Python37\lib\distutils\cmd.py", line 313, in run_command self.distribution.run_command(command) File "C:\Users\Nandi\AppData\Local\Programs\Python\Python37\lib\distutils\dist.py", line 985, in run_command cmd_obj.run() File "C:\Users\Nandi\AppData\Local\Programs\Python\Python37\lib\site-packages\setuptools\command\bdist_egg.py", line 173, in run cmd = self.call_command('install_lib', warn_dir=0) File "C:\Users\Nandi\AppData\Local\Programs\Python\Python37\lib\site-packages\setuptools\command\bdist_egg.py", line 159, in call_command self.run_command(cmdname) File "C:\Users\Nandi\AppData\Local\Programs\Python\Python37\lib\distutils\cmd.py", line 313, in run_command self.distribution.run_command(command) File "C:\Users\Nandi\AppData\Local\Programs\Python\Python37\lib\distutils\dist.py", line 985, in run_command cmd_obj.run() File "C:\Users\Nandi\AppData\Local\Programs\Python\Python37\lib\site-packages\setuptools\command\install_lib.py", line 12, in run outfiles = self.install() File "setup.py", line 133, in install self.announce('Installing shared library: %s', src) File "C:\Users\Nandi\AppData\Local\Programs\Python\Python37\lib\distutils\cmd.py", line 182, in announce log.log(level, msg) File "C:\Users\Nandi\AppData\Local\Programs\Python\Python37\lib\distutils\log.py", line 40, in log self._log(level, msg, args) File "C:\Users\Nandi\AppData\Local\Programs\Python\Python37\lib\distutils\log.py", line 21, in _log raise ValueError('%s wrong log level' % str(level)) ValueError: build\temp.win-amd64-3.7\Release\lib\dearmor.dll wrong log level

Nqndi commented 2 years ago

Traceback (most recent call last): File "<D:\another_asztal_backup\reverse_pyarmor\dist\bypass_license.py>", line 3, in File "", line 107, in File "", line 6, in init File "", line 36, in ask_for_license File "", line 9, in clear File "", line 149, in __armor_exit__ File "", line 94, in output_code File "", line 94, in File "", line 94, in output_code File "", line 94, in File "", line 94, in output_code File "", line 203, in wrapee AttributeError: 'code' object has no attribute 'co_posonlyargcount'

ErezAmihud commented 2 years ago

Thank you for the report! I have fixed it and it is now in the master branch. The first problem was a wrong function call. The second one was that co_posonlyargcount was added in python 3.8 and was not present in python3.7

Anyway, pull, install and it should work :)

Also, a reminder, it creates a pyc file in a folder called "dump" which meeds to be converted to python code using anotger library

Let me know how it goes