AlessandroZ / LaZagne

Credentials recovery project
GNU Lesser General Public License v3.0
9.52k stars 2.04k forks source link

Create a new version or.. How do I create the exe with pyinstaller? #633

Closed rodrigozanatta closed 10 months ago

rodrigozanatta commented 11 months ago

Hi. I am having problem with Fixhttps://github.com/AlessandroZ/LaZagne/issues/631. The exe is causing it. So, you fix it, but don't recreate the .exe file. I try to create it with pyinstaller but.. this is difficult because a lot of import.

Could you:

rodrigozanatta commented 10 months ago

Anyone have the script to compile the codes to the exe? Does it exist in the project and I don't see?

rodrigozanatta commented 10 months ago

After a lot of try and error, this is my best script and the program don't show any missing library. Some Unicrypto and pycryptdome give a little of problem, but after some fix, I can generate a exe file that works.

Using the windows/lazagne.spec didn't work... This is what I try. It generate a 22m file.

pyinstaller -F --console --clean --noupx  ^
--add-data ".\lazagne;.\lazagne" ^
--add-data ".\lazagne\config;.\lazagne\config" ^
--add-data ".\lazagne\config\crypto;.\lazagne\config\Crypto" ^
--add-data ".\lazagne\config\crypto\pyaes;.\lazagne\config\Crypto\pyaes" ^
--add-data ".\lazagne\config\DPAPI;.\lazagne\config\DPAPI" ^
--add-data ".\lazagne\config\lib;.\lazagne\config\lib" ^
--add-data ".\lazagne\config\lib\memorpy;.\lazagne\config\lib\memorpy" ^
--add-data ".\lazagne\softwares;.\lazagne\softwares" ^
--add-data ".\lazagne\softwares\browsers;.\lazagne\softwares\browsers" ^
--add-data ".\lazagne\softwares\chats;.\lazagne\softwares\chats" ^
--add-data ".\lazagne\softwares\databases;.\lazagne\softwares\databases" ^
--add-data ".\lazagne\softwares\games;.\lazagne\softwares\games" ^
--add-data ".\lazagne\softwares\git;.\lazagne\softwares\git" ^
--add-data ".\lazagne\softwares\mails;.\lazagne\softwares\mails" ^
--add-data ".\lazagne\softwares\maven;.\lazagne\softwares\maven" ^
--add-data ".\lazagne\softwares\memory;.\lazagne\softwares\memory" ^
--add-data ".\lazagne\softwares\multimedia;.\lazagne\softwares\multimedia" ^
--add-data ".\lazagne\softwares\php;.\lazagne\softwares\php" ^
--add-data ".\lazagne\softwares\svn;.\lazagne\softwares\svn" ^
--add-data ".\lazagne\softwares\sysadmin;.\lazagne\softwares\sysadmin" ^
--add-data ".\lazagne\softwares\wifi;.\lazagne\softwares\wifi" ^
--add-data ".\lazagne\softwares\windows;.\lazagne\softwares\windows" ^
--add-data ".\lazagne\softwares\windows\creddump7;.\lazagne\softwares\windows\creddump7" ^
--add-data ".\lazagne\softwares\windows\creddump7\win32;.\lazagne\softwares\windows\creddump7\win32" ^
--add-data "C:\Program Files\Python311\Lib\site-packages\crypto;.\Crypto" ^
--add-data "C:\Program Files\Python311\Lib\site-packages\crypto\Cipher;.\Crypto\Cipher"  ^
--add-data "c:\program files\python311\lib\site-packages\unicrypto;.\unicrypto" ^
--add-data "C:\Program Files\Python311\Lib\site-packages\unicrypto\backends;.\unicrypto\backends" ^
--add-data "C:\Program Files\Python311\Lib\site-packages\unicrypto\backends\cryptography;.\unicrypto\backends\cryptography" ^
--add-data "C:\Program Files\Python311\Lib\site-packages\unicrypto\backends\mbedtls;.\unicrypto\backends\mbedtls" ^
--add-data "C:\Program Files\Python311\Lib\site-packages\unicrypto\backends\pure;.\unicrypto\backends\pure" ^
--add-data "C:\Program Files\Python311\Lib\site-packages\unicrypto\backends\pure\external;.\unicrypto\backends\pure\external" ^
--add-data "C:\Program Files\Python311\Lib\site-packages\unicrypto\backends\pure\external\AES;.\unicrypto\backends\pure\external\AES" ^
--add-data "C:\Program Files\Python311\Lib\site-packages\unicrypto\backends\pure\external\DES;.\unicrypto\backends\pure\external\DES" ^
--add-data "C:\Program Files\Python311\Lib\site-packages\unicrypto\backends\pure\external\RC4;.\unicrypto\backends\pure\external\RC4" ^
--add-data "C:\Program Files\Python311\Lib\site-packages\unicrypto\backends\pure\padding;.\unicrypto\backends\pure\padding" ^
--add-data "C:\Program Files\Python311\Lib\site-packages\unicrypto\backends\pycrypto;.\unicrypto\backends\pycrypto" ^
--add-data "C:\Program Files\Python311\Lib\site-packages\unicrypto\backends\pycrypto\extra;.\unicrypto\backends\pycrypto\extra" ^
--add-data "C:\Program Files\Python311\Lib\site-packages\unicrypto\backends\pycryptodome;.\unicrypto\backends\pycryptodome" ^
--add-data "C:\Program Files\Python311\Lib\site-packages\unicrypto\backends\pycryptodomex;.\unicrypto\backends\pycryptodomex" ^
--add-data "C:\Program Files\Python311\Lib\site-packages\rsa;.\rsa" ^
--collect-submodules sqlite3 ^
--collect-submodules xml ^
--collect-submodules ctypes.util ^
--collect-submodules configparser ^
--collect-submodules glob ^
--collect-submodules pyasn1 ^
--collect-submodules pypykatz ^
--collect-submodules unicrypto ^
--collect-submodules unicrypto.backends.pycryptodomex ^
laZagne.py

What was I missing?

AlessandroZ commented 10 months ago

Hi,

The exe is build using github actions: https://github.com/AlessandroZ/LaZagne/actions/runs/4245186060/workflow I had created a wiki page to explain how I did it when I did it myself: https://github.com/AlessandroZ/LaZagne/wiki/How-to-compile Check also all other issues, this question has been asked a lot and many persons helped about it.

rodrigozanatta commented 10 months ago

Hi,

The exe is build using github actions: https://github.com/AlessandroZ/LaZagne/actions/runs/4245186060/workflow I had created a wiki page to explain how I did it when I did it myself: https://github.com/AlessandroZ/LaZagne/wiki/How-to-compile Check also all other issues, this question has been asked a lot and many persons helped about it.

What about create a new version? I read all the docs and still have some problem. The Fix 631 is really a problem. Just compile a new version! The second old is too old!