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

Binaries for Windows are not compiled correctly #10

Open
0xShkk opened this issue Aug 8, 2020 · 0 comments
Open

Binaries for Windows are not compiled correctly #10

0xShkk opened this issue Aug 8, 2020 · 0 comments

Comments

@0xShkk
Copy link

0xShkk commented Aug 8, 2020

Hi ropnop,

thank you very much for this awesome work.
Unfortunately I have discovered, that the compiled Windows binaries are not working as intended, since the last 4 to 5 releases.
I think this is due to the used python version you use to compile the binaries.

###This is the output on a Windows system, when running your compiled impacket Windows binaries:

wmiexec_windows.exe
Traceback (most recent call last):
File "wmiexec.py", line 32, in
File "C:\Python27\Lib\site-packages\PyInstaller\loader\pyimod03_importers.py", line 391, in load_module
File "impacket\version.py", line 11, in
File "site-packages\pkg_resources_init_.py", line 535, in get_distribution
File "site-packages\pkg_resources_init_.py", line 415, in get_provider
File "site-packages\pkg_resources_init_.py", line 943, in require
File "site-packages\pkg_resources_init_.py", line 829, in resolve
pkg_resources.DistributionNotFound: The 'impacket' distribution was not found and is required by the application
[3576] Failed to execute script wmiexec

I have compiled the most actual impacket build (v0.9.22.dev1+20200804.145312.110b886c) myself via PyInstaller and explicitely using Python3 as follows:

python3 -O -m PyInstaller --clean --onefile wmiexec.py

Did this on a Windows OS natively with installed Python and impacket distribution. You have to add a hook for PyInstaller still, if you compile this way. The hook must contain the following:

from PyInstaller.utils.hooks import copy_metadata
datas = copy_metadata('impacket')

When compiled via the method described above, all binaries seem to work well.

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

1 participant