snoopy-ng icon indicating copy to clipboard operation
snoopy-ng copied to clipboard

snoopy-ng on kali linux 2.0 doesn't install

Open ashtheman opened this issue 9 years ago • 16 comments

Basically i got this error and doesn't install snoopy from this point onwards. I tried apt-get-upgrade. Please help. I was once able to run now it keeps giving me same error. Not sure what is incorrect please help.

warning: no files found matching 'examples/miniterm.py' warning: no files found matching 'test/test_io_lib.py' Requirement already satisfied (use --upgrade to upgrade): pyserial==2.6 from https://pypi.python.org/packages/source/p/pyserial/pyserial-2.6.tar.gz in /usr/lib/python2.7/dist-packages Cleaning up... [+] Downloading pylibpcap... Downloading/unpacking pylibpcap from https://sourceforge.net/projects/pylibpcap/files/latest/download?source=files Downloading download (49kB): 49kB downloaded Running setup.py (path:/tmp/pip-build-Je90oV/pylibpcap/setup.py) egg_info for package pylibpcap

warning: no files found matching 'pypcap-int.h'

Installing collected packages: pylibpcap Running setup.py install for pylibpcap building '_pcapmodule' extension x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fno-strict-aliasing -D_FORTIFY_SOURCE=2 -g -fstack-protector-strong -Wformat -Werror=format-security -fPIC -DSWIG_COBJECT_TYPES -I/usr/include/python2.7 -c pcap.c -o build/temp.linux-x86_64-2.7/pcap.o pcap.c: In function ‘SWIG_Python_AddErrorMsg’: pcap.c:853:5: error: format not a string literal and no format arguments [-Werror=format-security] PyErr_Format(PyExc_RuntimeError, mesg); ^ cc1: some warnings being treated as errors error: command 'x86_64-linux-gnu-gcc' failed with exit status 1 Complete output from command /usr/bin/python -c "import setuptools, tokenize;file='/tmp/pip-build-Je90oV/pylibpcap/setup.py';exec(compile(getattr(tokenize, 'open', open)(file).read().replace('\r\n', '\n'), file, 'exec'))" install --record /tmp/pip-6UoyvJ-record/install-record.txt --single-version-externally-managed --compile: running install

running build

running build_ext

building '_pcapmodule' extension

creating build

creating build/temp.linux-x86_64-2.7

x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fno-strict-aliasing -D_FORTIFY_SOURCE=2 -g -fstack-protector-strong -Wformat -Werror=format-security -fPIC -DSWIG_COBJECT_TYPES -I/usr/include/python2.7 -c pcap.c -o build/temp.linux-x86_64-2.7/pcap.o

pcap.c: In function ‘SWIG_Python_AddErrorMsg’:

pcap.c:853:5: error: format not a string literal and no format arguments [-Werror=format-security]

 PyErr_Format(PyExc_RuntimeError, mesg);

 ^

cc1: some warnings being treated as errors

error: command 'x86_64-linux-gnu-gcc' failed with exit status 1


Cleaning up... Command /usr/bin/python -c "import setuptools, tokenize;file='/tmp/pip-build-Je90oV/pylibpcap/setup.py';exec(compile(getattr(tokenize, 'open', open)(file).read().replace('\r\n', '\n'), file, 'exec'))" install --record /tmp/pip-6UoyvJ-record/install-record.txt --single-version-externally-managed --compile failed with error code 1 in /tmp/pip-build-Je90oV/pylibpcap Traceback (most recent call last): File "/usr/local/bin/pip", line 9, in load_entry_point('pip==1.5.6', 'console_scripts', 'pip')() File "/usr/lib/python2.7/dist-packages/pip/init.py", line 248, in main return command.main(cmd_args) File "/usr/lib/python2.7/dist-packages/pip/basecommand.py", line 161, in main text = '\n'.join(complete_log) UnicodeDecodeError: 'ascii' codec can't decode byte 0xe2 in position 24: ordinal not in range(128)

ashtheman avatar Oct 06 '15 08:10 ashtheman

using apt-get update apt-get upgrade

sorted this issue.

ashtheman avatar Oct 11 '15 13:10 ashtheman

Sadly it didn't work for me - I still have issues:

[+] Installing pyserial 2.6
Downloading/unpacking https://pypi.python.org/packages/source/p/pyserial/pyserial-2.6.tar.gz
  Downloading pyserial-2.6.tar.gz (116kB): 116kB downloaded
  Running setup.py (path:/tmp/pip-rzwXeD-build/setup.py) egg_info for package from https://pypi.python.org/packages/source/p/pyserial/pyserial-2.6.tar.gz

    warning: no files found matching 'examples/miniterm.py'
    warning: no files found matching 'test/test_io_lib.py'
  Requirement already satisfied (use --upgrade to upgrade): pyserial==2.6 from https://pypi.python.org/packages/source/p/pyserial/pyserial-2.6.tar.gz in /usr/lib/python2.7/dist-packages
Cleaning up...
[+] Downloading pylibpcap...
Downloading/unpacking pylibpcap from https://sourceforge.net/projects/pylibpcap/files/latest/download?source=files
  Downloading download (49kB): 49kB downloaded
  Running setup.py (path:/tmp/pip-build-e0RfLT/pylibpcap/setup.py) egg_info for package pylibpcap

    warning: no files found matching 'pypcap-int.h'
Installing collected packages: pylibpcap
  Running setup.py install for pylibpcap
    building '_pcapmodule' extension
    x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fno-strict-aliasing -D_FORTIFY_SOURCE=2 -g -fstack-protector-strong -Wformat -Werror=format-security -fPIC -DSWIG_COBJECT_TYPES -I/usr/include/python2.7 -c pcap.c -o build/temp.linux-x86_64-2.7/pcap.o
    pcap.c: In function âSWIG_Python_AddErrorMsgâ:
    pcap.c:853:5: error: format not a string literal and no format arguments [-Werror=format-security]
         PyErr_Format(PyExc_RuntimeError, mesg);
         ^
    cc1: some warnings being treated as errors
    error: command 'x86_64-linux-gnu-gcc' failed with exit status 1
    Complete output from command /usr/bin/python -c "import setuptools, tokenize;__file__='/tmp/pip-build-e0RfLT/pylibpcap/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-xaYf0O-record/install-record.txt --single-version-externally-managed --compile:
    running install

running build

running build_ext

building '_pcapmodule' extension

creating build

creating build/temp.linux-x86_64-2.7

x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fno-strict-aliasing -D_FORTIFY_SOURCE=2 -g -fstack-protector-strong -Wformat -Werror=format-security -fPIC -DSWIG_COBJECT_TYPES -I/usr/include/python2.7 -c pcap.c -o build/temp.linux-x86_64-2.7/pcap.o

pcap.c: In function âSWIG_Python_AddErrorMsgâ:

pcap.c:853:5: error: format not a string literal and no format arguments [-Werror=format-security]

     PyErr_Format(PyExc_RuntimeError, mesg);

     ^

cc1: some warnings being treated as errors

error: command 'x86_64-linux-gnu-gcc' failed with exit status 1

----------------------------------------
Cleaning up...
Command /usr/bin/python -c "import setuptools, tokenize;__file__='/tmp/pip-build-e0RfLT/pylibpcap/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-xaYf0O-record/install-record.txt --single-version-externally-managed --compile failed with error code 1 in /tmp/pip-build-e0RfLT/pylibpcap
Traceback (most recent call last):
  File "/usr/local/bin/pip", line 9, in <module>
    load_entry_point('pip==1.5.6', 'console_scripts', 'pip')()
  File "/usr/lib/python2.7/dist-packages/pip/__init__.py", line 248, in main
    return command.main(cmd_args)
  File "/usr/lib/python2.7/dist-packages/pip/basecommand.py", line 161, in main
    text = '\n'.join(complete_log)
UnicodeDecodeError: 'ascii' codec can't decode byte 0xe2 in position 24: ordinal not in range(128)
root@kali:~/Documents/snoopy-ng#

blacksd avatar Oct 21 '15 13:10 blacksd

For me to get Snoopy-ng to work on my Kali 2.0 instance, was to install python-libpcap first before running the install.sh script apt-get install python-libpcap

grayburn avatar Oct 23 '15 19:10 grayburn

One more thing, you need to downgrade sqlalchemy to 0.7.8 easy_install "SQLAlchemy==0.7.8"

grayburn avatar Oct 29 '15 01:10 grayburn

sadly i can't manage to install python-libpcap on kali rolling, there is no such package i've tried to download the source from http://sourceforge.net/projects/pylibpcap/ but encountered the same error when trying to install it ( pcap.c is missing)

EDIT: found a fix, by installing swing 1.3.40 and editing the setup.py file i was able to install the pylibpcap on kali rolling and after that snoopy installed without problems

Da5hes avatar Feb 08 '16 10:02 Da5hes

I am having the same issue, i have tried the above anyone else have the solution?

Ianjohnnyboy avatar Feb 20 '16 17:02 Ianjohnnyboy

Reading package lists... Done Building dependency tree
Reading state information... Done ntpdate is already the newest version (1:4.2.6.p5+dfsg-7+deb8u1). 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded. [ ok ] Stopping ntp (via systemctl): ntp.service. [+] Setting time with ntp 20 Feb 17:38:13 ntpdate[8206]: adjust time server 91.189.89.199 offset -0.001849 sec [ ok ] Starting ntp (via systemctl): ntp.service. [+] Setting timzeone...

Current default time zone: 'Etc/UTC' Local time is now: Sat Feb 20 17:38:14 UTC 2016. Universal Time is now: Sat Feb 20 17:38:14 UTC 2016.

[+] Installing sakis3g... [+] Updating repository... Ign:1 http://dl.google.com/linux/chrome/deb stable InRelease Hit:2 http://dl.google.com/linux/chrome/deb stable Release
Hit:4 http://ftp.hands.com/kali sana InRelease
Hit:5 http://ftp.hands.com/kali-security sana/updates InRelease Reading package lists... Done [+] Installing required packages... Reading package lists... Done Building dependency tree
Reading state information... Done Note, selecting 'libxslt1-dev' instead of 'libxslt-dev' build-essential is already the newest version (11.7). iw is already the newest version (3.17-1). iw set to manually installed. python-flask is already the newest version (0.10.1-2). python-flask set to manually installed. python-bluez is already the newest version (0.22-1). python-bluez set to manually installed. python-setuptools is already the newest version (18.8-1). python-setuptools set to manually installed. ppp is already the newest version (2.4.7-1+1). ppp set to manually installed. mitmproxy is already the newest version (0.15-0kali2). mitmproxy set to manually installed. python-dev is already the newest version (2.7.11-1). python-dev set to manually installed. tcpdump is already the newest version (4.7.4-1+b1). tcpdump set to manually installed. sqlite3 is already the newest version (3.9.2-1). sqlite3 set to manually installed. python-dateutil is already the newest version (2.4.2-1). python-dateutil set to manually installed. python-psutil is already the newest version (2.2.1-3+b1). python-psutil set to manually installed. pyrit is already the newest version (0.4.0-5+b1). pyrit set to manually installed. python-serial is already the newest version (3.0-1). python-serial set to manually installed. python-requests is already the newest version (2.9.1-1). python-requests set to manually installed. python2.7-dev is already the newest version (2.7.11-2). python2.7-dev set to manually installed. Some packages could not be installed. This may mean that you have requested an impossible situation or if you are using the unstable distribution that some required packages have not yet been created or been moved out of Incoming. The following information may help to resolve the situation:

The following packages have unmet dependencies: libpcap0.8-dev : Depends: libpcap0.8 (= 1.6.2-2) but 1.7.4-2kali1 is to be installed libxml2-dev : Depends: libxml2 (= 2.9.1+dfsg1-5+deb8u1) but 2.9.3+dfsg1-1 is to be installed libxslt1-dev : Depends: libxslt1.1 (= 1.1.28-2+b2) but 1.1.28-2.1 is to be installed E: Unable to correct problems, you have held broken packages.

Ianjohnnyboy avatar Feb 20 '16 17:02 Ianjohnnyboy

im getting the same as you @Ianjohnnyboy, snoopy seems to have a very bizarre install process, its been different on each machine i've tried it on!

alijnclarke avatar May 12 '16 21:05 alijnclarke

Please see my gist...it may help you.

JosephGregg avatar May 13 '16 13:05 JosephGregg

i have the same problem as @Ianjohnnyboy . im running kali sana . could anyone fix this so far ?

Msiavashi avatar May 24 '16 22:05 Msiavashi

Install python-libpcap. Try the following if it is not available in the Kali repos:

For Raspberry Pi 3 wget http://http.kali.org/kali/pool/main/p/python-libpcap/python-libpcap_0.6.4-1_armhf.deb dpkg -i python-libpcap_0.6.4-1_armhf.deb

For other Linux (64-bit) wget http://http.kali.org/kali/pool/main/p/python-libpcap/python-libpcap_0.6.4-1_amd64.deb dpkg -i python-libpcap_0.6.4-1_amd64.deb

af001 avatar Jun 21 '16 22:06 af001

Isn't python-libpcap replaced by python-pypcap?

python-pypcap: /usr/lib/pyshared/python2.6/pcap.so
python-pypcap: /usr/lib/pyshared/python2.7/pcap.so
python-pypcap: /usr/lib/python2.6/dist-packages/pcap.so
python-pypcap: /usr/lib/python2.6/dist-packages/py_pypcap-1.1.2.egg-info
python-pypcap: /usr/lib/python2.7/dist-packages/pcap.so
python-pypcap: /usr/lib/python2.7/dist-packages/py_pypcap-1.1.2.egg-info
python-pypcap: /usr/share/doc/python-pypcap/README
python-pypcap: /usr/share/doc/python-pypcap/changelog.Debian.gz
python-pypcap: /usr/share/doc/python-pypcap/copyright
python-pypcap: /usr/share/doc/python-pypcap/examples/test.pcap
python-pypcap: /usr/share/doc/python-pypcap/examples/test.py
python-pypcap: /usr/share/doc/python-pypcap/examples/testsniff.py
python-pypcap: /usr/share/pyshared/py_pypcap-1.1.2.egg-info

strasharo avatar Oct 29 '16 20:10 strasharo

Failing on Raspbian Jesse too [+] Downloading pylibpcap... Collecting pylibpcap from https://sourceforge.net/projects/pylibpcap/files/latest/download?source=files#egg=pylibpcap Downloading https://sourceforge.net/projects/pylibpcap/files/latest/download?source=files (49kB) 100% |████████████████████████████████| 51kB 5.4MB/s Installing collected packages: pylibpcap Running setup.py install for pylibpcap ... error Complete output from command /root/snoopy-ng/venv/bin/python -u -c "import setuptools, tokenize;file='/tmp/pip-build-QR7oR3/pylibpcap/setup.py';exec(compile(getattr(tokenize, 'open', open)(file).read().replace('\r\n', '\n'), file, 'exec'))" install --record /tmp/pip-gHwnUS-record/install-record.txt --single-version-externally-managed --compile --install-headers /root/snoopy-ng/venv/include/site/python2.7/pylibpcap: running install running build running build_ext building '_pcapmodule' extension creating build creating build/temp.linux-armv7l-2.7 arm-linux-gnueabihf-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fno-strict-aliasing -D_FORTIFY_SOURCE=2 -g -fstack-protector-strong -Wformat -Werror=format-security -fPIC -DSWIG_COBJECT_TYPES -I/usr/include/python2.7 -c pcap.c -o build/temp.linux-armv7l-2.7/pcap.o pcap.c: In function ‘SWIG_Python_AddErrorMsg’: pcap.c:853:5: error: format not a string literal and no format arguments [-Werror=format-security] PyErr_Format(PyExc_RuntimeError, mesg); ^ cc1: some warnings being treated as errors error: command 'arm-linux-gnueabihf-gcc' failed with exit status 1

----------------------------------------

Command "/root/snoopy-ng/venv/bin/python -u -c "import setuptools, tokenize;file='/tmp/pip-build-QR7oR3/pylibpcap/setup.py';exec(compile(getattr(tokenize, 'open', open)(file).read().replace('\r\n', '\n'), file, 'exec'))" install --record /tmp/pip-gHwnUS-record/install-record.txt --single-version-externally-managed --compile --install-headers /root/snoopy-ng/venv/include/site/python2.7/pylibpcap" failed with error code 1 in /tmp/pip-build-QR7oR3/pylibpcap/

coolnetworks avatar Nov 02 '16 04:11 coolnetworks

This site solved it for me:

http://infosecdc.blogspot.com.au/2016/07/passively-monitoring-devices-with.html

coolnetworks avatar Nov 02 '16 04:11 coolnetworks

@coolnetworks This one is customized for Raspbian: https://github.com/SamuelWN/snoopy-ng

strasharo avatar Nov 02 '16 07:11 strasharo

If libpcap is already installed, try commenting out those two lines from the install script ( wget and dpkg).

On Dec 30, 2016 11:30 PM, Guavin1 [email protected] wrote:

For other Linux (64-bit) wget http://http.kali.org/kali/pool/main/p/python-libpcap/python-libpcap_0.6.4-1_amd64.deb dpkg -i python-libpcap_0.6.4-1_amd64.deb

this semi works for me i get an error

dpkg: regarding python-libpcap_0.6.4-1_amd64.deb containing python-libpcap: python-libpcap conflicts with python-pypcap python-pypcap (version 1.1.5-1) is present and installed.

dpkg: error processing archive python-libpcap_0.6.4-1_amd64.deb (--install): conflicting packages - not installing python-libpcap Errors were encountered while processing: python-libpcap_0.6.4-1_amd64.deb

i've uninstalled pypcap multiple times and restarted my system anyone know how to fix it?

— You are receiving this because you commented. Reply to this email directly, view it on GitHubhttps://github.com/sensepost/snoopy-ng/issues/66#issuecomment-269848836, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AKGPDz-HDMBlNrzvsUxH6gCXibmFohQ2ks5rNdpmgaJpZM4GJlrZ.

af001 avatar Dec 31 '16 12:12 af001