pombreda / impacket

Automatically exported from code.google.com/p/impacket
Other
0 stars 0 forks source link

Module Import Failure #23

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
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 commented 9 years ago
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 commented 9 years ago
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 commented 9 years ago
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 commented 9 years ago
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

GoogleCodeExporter commented 9 years ago
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 commented 9 years ago
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