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

Error: pkg_resources.DistributionNotFound: The 'impacket' distribution was not found and is required by the application #5

Open
nullcult opened this issue Apr 13, 2020 · 1 comment

Comments

@nullcult
Copy link

Trying to follow your guide on compiling the binaries and am constantly getting the error below when i run the complied binary. I've searched everywhere but I can't find any hints. What could I be doing wrong?

Traceback (most recent call last):
  File "wmiexec.py", line 32, in <module>
  File "c:\users\root\appdata\local\temp\pip-install-bmnnbc\pyinstaller\PyInstaller\loader\pyimod03_importers.py", line 391, in load_module
  File "site-packages\impacket-0.9.22.dev1+20200327.103853.7e50589-py2.7.egg\impacket\version.py", line 11, in <module>
  File "site-packages\pkg_resources\__init__.py", line 481, in get_distribution
  File "site-packages\pkg_resources\__init__.py", line 357, in get_provider
  File "site-packages\pkg_resources\__init__.py", line 900, in require
  File "site-packages\pkg_resources\__init__.py", line 786, in resolve
pkg_resources.DistributionNotFound: The 'impacket' distribution was not found and is required by the application
[3336] Failed to execute script wmiexec
@maaaaz
Copy link
Owner

maaaaz commented Apr 13, 2020

I have never had this bug before as this get_distribution code is quite recent.

It seems to be an common issue related to PyInstaller not copying metadata before packaging, you can fix it by creating a specific hook for impacket, like documented here and here.

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