sensepost / snoopy-ng

Snoopy v2.0 - modular digital terrestrial tracking framework
Other
429 stars 128 forks source link

issue with pylibcap on ubuntu pcap.c:853:5: error: format not a string literal and no format arguments #95

Open tomachinz opened 6 years ago

tomachinz commented 6 years ago

This is a fresh git clone of snoopy-ng going onto a freshly started amazon ec2 instance of ubuntu.

Linux ip-172-30-0-82 4.4.0-1022-aws #31-Ubuntu SMP Tue Jun 27 11:27:55 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux

Requirement already satisfied: dnslib in /usr/local/lib/python2.7/dist-packages [+] Installing pyserial 2.6 Collecting https://pypi.python.org/packages/source/p/pyserial/pyserial-2.6.tar.gz Using cached pyserial-2.6.tar.gz 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/local/lib/python2.7/dist-packages [+] Downloading pylibpcap... Collecting pylibpcap from https://sourceforge.net/projects/pylibpcap/files/latest/download?source=files#egg=pylibpcap Using cached https://sourceforge.net/projects/pylibpcap/files/latest/download?source=files Installing collected packages: pylibpcap Running setup.py install for pylibpcap ... error Complete output from command /usr/bin/python -u -c "import setuptools, tokenize;file='/tmp/pip-build-wkDWzf/pylibpcap/setup.py';f=getattr(tokenize, 'open', open)(file);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, file, 'exec'))" install --record /tmp/pip-mD207Z-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 -Wdate-time -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

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

Command "/usr/bin/python -u -c "import setuptools, tokenize;file='/tmp/pip-build-wkDWzf/pylibpcap/setup.py';f=getattr(tokenize, 'open', open)(file);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, file, 'exec'))" install --record /tmp/pip-mD207Z-record/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /tmp/pip-build-wkDWzf/pylibpcap/ root@ip-172-30-0-82:~/snoopy-ng#

NoobieDog commented 6 years ago

@tomachinz Thanks for the error report.

This repo is no longer maintained. Please check out SensePost/Peanuts for a similar tool.

Can i ask why your trying to install this to a AWS ec2 instance?

Kind regards

ghost commented 5 years ago

https://github.com/Cyb3rHacks/Snoopy-ng-2018-UPDATED-

0xe7 commented 4 years ago

to fix this error change pcap.c on line 853 from:

PyErr_Format(PyExc_RuntimeError, mesg);

to:

PyErr_Format(PyExc_RuntimeError, "%s", mesg);

pylibpcap then compiles.

gpahlevanzadeh commented 2 years ago

@0xe7 Thank you, With your suggestion my problem was solved.