Unable to run impacket

Hey guys,

I'm trying to run the MS SQL client from Impacket but I'm getting the error:

Traceback (most recent call last):
File "mssqlclient.py", line 24, in
from impacket.examples import logger
ImportError: No module named impacket.examples

Install impacket by cloning the git repository
I have python3 installed I hope you can help me.

Comments

  • @JorgeH said:

    Hey guys,

    I'm trying to run the MS SQL client from Impacket but I'm getting the error:

    Traceback (most recent call last):
    File "mssqlclient.py", line 24, in
    from impacket.examples import logger
    ImportError: No module named impacket.examples

    Install impacket by cloning the git repository
    I have python3 installed I hope you can help me.

    There are a lot of threads talking about impacket, assuming this is for Archtype.

    There are a few things that could be causing the problem here.

    Note: I am not going to be available much in September.

    TazWake

    Note: https://www.nohello.com/

    Happy to help people but PLEASE explain your problem in as much detail as possible! If you say vague things like "It's not working", I cant help. This isn't Twitter so my DMs are always open.

  • That's because the PATH, your user and root maybe not use the same python intepreter to run this program,

    In some case, you can solve it by type python3 /path/to/mssqlclient.py rather than run it directly.

    Arrexel

  • edited May 2

    Traceback (most recent call last):
    File "mssqlclient.py", line 24, in
    from impacket.examples import logger
    ImportError: No module named impacket.examples

    Install impacket by cloning the git repository
    I have python3 installed I hope you can help me.

    I had the same problem.

    Run this command to verify your python version
    python --version

    Once you find that out lets get rid of the files that were made when you pip installed so that we can redo it.
    For python 2.7: rm -rf /usr/local/lib/python2.7/dist-packages/impacket*
    For python 3(replace x once you find the version): rm -rf /usr/local/lib/python3.x/dist-packages/impacket*

    Great you're all cleaned up. Now, get rid of your impacket directory
    sudo rm -rf impacket

    Now we reinstall impacket with git clone.
    git clone https://github.com/SecureAuthCorp/impacket.git

    Go into your impacket directory: cd /pathto/impacket

    NOW THIS IS VERY IMPORTANT:
    For python3 type: sudo pip3 install .
    DO NOT FORGET THE PERIOD AT THE END.
    For python 2.xx type: sudo pip install .

    Then you should be able to use the tool as implied with no problems. I hope this helps!

  • this damn module is killing me.
Sign In to comment.