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

Module Import Failure #23

Closed
GoogleCodeExporter opened this issue Apr 15, 2015 · 6 comments
Closed

Module Import Failure #23

GoogleCodeExporter opened this issue Apr 15, 2015 · 6 comments

Comments

@GoogleCodeExporter
Copy link

What steps will reproduce the problem?
1. Download impacket-0.9.9.9.tar.gz, untar package. 
2. cd into impacket directory, run python setup install
3. run interactive python prompt
   import module: from impacket.examples import psexec

What is the expected output? What do you see instead?

>>> from impacket.examples import psexec
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ImportError: No module named examples

What version of the product are you using? On what operating system?

impacket-0.9.9.9, OS backtrack 5 and also tested on Fedora 16

Please provide any additional information below.

Attempted to include __init__.py within the examples directory. Import still 
fails. 


Original issue reported on code.google.com by larry262...@gmail.com on 30 Apr 2013 at 2:03

@GoogleCodeExporter
Copy link
Author

Hey Larry:

Thanks for the bug report. Sadly the setup.py file in 0.9.9.9 is missing 
copying the impacket/examples directory into the right destination.

Inside the setup.py file locate the line:
      packages = ['impacket', 'impacket.dcerpc'],
and change it to:
      packages = ['impacket', 'impacket.dcerpc', 'impacket.examples'],

run setup.py again and let me know if it works. That has been fixed in trunk 
already a few weeks ago. I'm about to release a new version with this patch.

regards,
beto

Original comment by bet...@gmail.com on 30 Apr 2013 at 4:02

@GoogleCodeExporter
Copy link
Author

beto,

I checked the setup.py file. 'impacket.examples' is already listed within
the packages list. Let me check out the trunk version and see if that
remedies the issue.

Original comment by larry262...@gmail.com on 30 Apr 2013 at 2:12

@GoogleCodeExporter
Copy link
Author

That is weird Larry. Be careful not to confuse the examples directory (where 
psexec is for example) with the impacket.examples package, which is a set of 
libraries that are used by the examples.

Whenever you do python setup.py install, it will copy the packages to the 
site-packages directories and the example scripts (psexec.py, smbclient.py, 
etc) to /usr/local/bin.

I'm online if you need some help.


Original comment by bet...@gmail.com on 30 Apr 2013 at 2:19

@GoogleCodeExporter
Copy link
Author

Ok.. 

Looks like problem was another copy of impacket installed in the system.

I'm closing this one.

Original comment by bet...@gmail.com on 30 Apr 2013 at 3:09

  • Changed state: Invalid

@GoogleCodeExporter
Copy link
Author

as an FYI if you download the 
impacket-0.9.9.9 tarball you still have to change the setup.py file

Original comment by chrisg8...@gmail.com on 23 Jan 2014 at 2:47

@GoogleCodeExporter
Copy link
Author

Hey mate.. 

yep.. most probably.. that got solved in impacket-0.9.9.10.. is it working for 
you now? I should actually take that version out from the download area.

bto

Original comment by bet...@gmail.com on 23 Jan 2014 at 1:18

ShutdownRepo referenced this issue in ThePorgs/impacket Nov 26, 2022
p0dalirius pushed a commit to p0dalirius/impacket that referenced this issue Jan 16, 2023
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