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

Issue Installing Impacket 0.9.22 on Kali Linux 2021 #1065

Closed
revronja opened this issue Apr 24, 2021 · 7 comments
Closed

Issue Installing Impacket 0.9.22 on Kali Linux 2021 #1065

revronja opened this issue Apr 24, 2021 · 7 comments

Comments

@revronja
Copy link

trying to do this

  1. grab https://github.com/SecureAuthCorp/impacket/releases/tag/impacket_0_9_22
  2. cd impacket
  3. sudo pip3 install .
  4. cd examples
  5. python3 GetNPUSers.py

the error is always for python3

SyntaxError: Missing parentheses in call to 'print'. Did you mean print("%s" % msg, end=" ")?

and this for python2

ImportError: No module named pyasn1.codec.der

@nuschpl
Copy link

nuschpl commented Apr 27, 2021

Without exact error messages,with line numbers and paths which is reason of your issues is hard to debug.

Also try my method here instead of your point 3:
4cf864f

@ghost
Copy link

ghost commented Apr 27, 2021

Have the same problem, but in other file!

Traceback (most recent call last):
File "./GetUserSPNs.py", line 39, in
from pyasn1.codec.der import decoder
ImportError: No module named pyasn1.codec.der

@0xdeaddood
Copy link
Collaborator

Hi guys!
Please check your setups (it seems that pip3 and python3 are not in the same path), and reinstall it. You can also try the @nuschpl's method.

Closing. Reopen if needed.

@revronja
Copy link
Author

revronja commented Apr 28, 2021

this fails still

┌──(kali㉿kali)-[~/impacket-0.9.22/examples]
└─$ which python3 1 ⨯
/usr/bin/python3

└─$ which pip3
/usr/bin/pip3

┌──(kali㉿kali)-[~/impacket-0.9.22]
└─$ sudo python3 -m pip install .

└─$ python3 GetNPUsers.py 1 ⨯
Traceback (most recent call last):
File "/home/kali/impacket-0.9.22/examples/GetNPUsers.py", line 39, in
from impacket.dcerpc.v5.samr import UF_ACCOUNTDISABLE, UF_DONT_REQUIRE_PREAUTH
File "/home/kali/.local/lib/python3.9/site-packages/impacket/dcerpc/v5/samr.py", line 303
print "%s" % msg,
^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print("%s" % msg, end=" ")?

@0xdeaddood
Copy link
Collaborator

Hi @revronja!
That error is from a version prior to porting to python 3 (it was addressed here: 0a4c787). It looks like you are using a new version of the GetNPUsers.py script with an old version of Impacket.

You need to install the latest version of the Impacket library. Try again following this and check the output to rule out problems in your setup. Related issue: #969

Alternatively, you can try to test impacket cloning and installing the library into a Virtual Environment. This helps to avoid any potential mix of different versions.

@RubensZimbres
Copy link

For me, works with Python 3:

$ pip3 install .

$ python3 GetUserSPNs.py .....

@SudoIndividual
Copy link

For me, works with Python 3:

$ pip3 install .

$ python3 GetUserSPNs.py .....

this works thanks

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

5 participants