python-imaging-librarydpktsnoopy

Installing Snoopy-ng


I had a problem while installing Snoopy which I couldn't resolve and couldn't find any answers to, so I spent over 8 hours figuring it out and I'm going to post it here so others don't need to struggle.

My problems were that the installation would fail when collecting PIL

The error was:

Could not find a version that satisfies the requirement PIL (from versions: ) No matching distribution found for PIL

Another error I got was an issue with a python library:

Command "/usr/bin/python -u -c "import setuptools, tokenize;file='/tmp/pip-build-7DSxKG/pylibpcap/setup.py';exec(compile(getattr(tokenize, 'open', open)(file).read().replace('\r\n', '\n'), file, 'exec'))" install --record /tmp/pip-UmzXwX-record/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /tmp/pip-build-7DSxKG/pylibpcap/

The last error I got was that the dpkt couldn't download because of a 404. the error message I got was:

Collecting https://dpkt.googlecode.com/files/dpkt-1.8.tar.gz HTTP error 404 while getting https://dpkt.googlecode.com/files/dpkt-1.8.tar.gz Could not install requirement https://dpkt.googlecode.com/files/dpkt-1.8.tar.gz because of error 404 Client Error: Not Found for url: https://dpkt.googlecode.com/files/dpkt-1.8.tar.gz Could not install requirement https://dpkt.googlecode.com/files/dpkt-1.8.tar.gz because of HTTP error 404 Client Error: Not Found for url: https://dpkt.googlecode.com/files/dpkt-1.8.tar.gz for URL https://dpkt.googlecode.com/files/dpkt-1.8.tar.gz

After I fixed these errors snoopy installed perfectly, I'll post how I sloved all of these issues now.


Solution

  • I solved these issues by doing the following:

    Execute the following commands in terminal.

    apt-get update
    apt-get upgrade
    apt-get install python-libpcap
    

    then either in terminal with nano or using your trusty text editor open the snoopy-ng install.sh:

    In terminal cd to where install.sh is kept and type

    nano install.sh
    

    go to

    echo "[+] Downloading dpkt..."

    and by the link link which should be "https://dpkt.googlecode.com/files/dpkt-1.8.tar.gz"

    change it to

    http://pkgs.fedoraproject.org/repo/pkgs/python-dpkt/dpkt-1.8.tar.gz/0f8e5a4d4b2f5d5faaf7bbfbf3e1e8b7/dpkt-1.8.tar.gz

    next save the install.sh, in nano do this by pressing ctrl + x this will exit the file and prompt you to save the file, press y to save changes next go to terminal and type

    sudo sh install.sh
    

    Voila! Snoopy should install without any issues.