shramos / polymorph

Polymorph is a real-time network packet manipulation framework with support for almost all existing protocols
GNU General Public License v2.0
445 stars 61 forks source link

plymorph install #10

Closed nickarcaro closed 3 years ago

nickarcaro commented 4 years ago

hi everyone! , i've trying install polymoprh and i can't install netfilterqueue. this is my error:

Building wheels for collected packages: NetfilterQueue Running setup.py bdistwheel for NetfilterQueue ... error Complete output from command /usr/bin/python3 -u -c "import setuptools, tokenize;file='/tmp/pip-install-ynn0l5e/NetfilterQueue/setup.py';f=getattr(tokenize, 'open', open)(file);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, file, 'exec'))" bdist_wheel -d /tmp/pip-wheel-rjbzwt18 --python-tag cp37: running bdist_wheel running build running build_ext building 'netfilterqueue' extension creating build creating build/temp.linux-x86_64-3.7 x86_64-linux-gnu-gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -g -fwrapv -O2 -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -I/usr/include/python3.7m -c netfilterqueue.c -o build/temp.linux-x86_64-3.7/netfilterqueue.o netfilterqueue.c: In function ‘__pyx_f_14netfilterqueue_6Packet_set_nfq_data’: netfilterqueue.c:2150:68: warning: passing argument 2 of ‘nfq_get_payload’ from incompatible pointer type [-Wincompatible-pointer-types] 2150 pyx_v_self->payload_len = nfq_get_payload(__pyx_v_self->_nfa, (&pyx_v_self->payload)); ~^~~~~~~
char **

In file included from netfilterqueue.c:440: /usr/include/libnetfilter_queue/libnetfilter_queue.h:122:67: note: expected ‘unsigned char ’ but argument is of type ‘char ’ 122 | extern int nfq_get_payload(struct nfq_data *nfad, unsigned char *data); | ~~~~^~~~ netfilterqueue.c: In function ‘__pyx_pf_14netfilterqueue_6Packet_4get_hw’: netfilterqueue.c:2533:17: warning: implicit declaration of function ‘PyString_FromStringAndSize’; did you mean ‘PyBytes_FromStringAndSize’? [-Wimplicit-function-declaration] 2533 | __pyx_t_3 = PyString_FromStringAndSize(((char )pyx_v_self->hw_addr), 8); if (unlikely(!pyx_t_3)) PYX_ERR(0, 111, pyx_L1_error) | ^~~~~~ | PyBytes_FromStringAndSize netfilterqueue.c:2533:15: warning: assignment to ‘PyObject ’ {aka ‘struct _object ’} from ‘int’ makes pointer from integer without a cast [-Wint-conversion] 2533 | pyx_t_3 = PyString_FromStringAndSize(((char *)__pyx_v_self->hw_addr), 8); if (unlikely(!pyx_t_3)) PYX_ERR(0, 111, pyx_L1_error) | ^ netfilterqueue.c: In function ‘Pyx_PyCFunction_FastCall’: netfilterqueue.c:6436:13: error: too many arguments to function ‘(PyObject ()(PyObject , PyObject const, Py_ssize_t))meth’ 6436 | return (((__Pyx_PyCFunctionFast)meth)) (self, args, nargs, NULL); | ~^~~~~~~ netfilterqueue.c: In function ‘PyxExceptionSave’: netfilterqueue.c:7132:21: error: ‘PyThreadState’ {aka ‘struct _ts’} has no member named ‘exc_type’; did you mean ‘curexc_type’? 7132 | type = tstate->exc_type; | ^~~~ | curexc_type netfilterqueue.c:7133:22: error: ‘PyThreadState’ {aka ‘struct _ts’} has no member named ‘exc_value’; did you mean ‘curexc_value’? 7133 | value = tstate->exc_value; | ^~~~~ | curexc_value netfilterqueue.c:7134:19: error: ‘PyThreadState’ {aka ‘struct _ts’} has no member named ‘exc_traceback’; did you mean ‘curexc_traceback’? 7134 | *tb = tstate->exc_traceback; | ^~~~~ | curexc_traceback netfilterqueue.c: In function ‘PyxExceptionReset’: netfilterqueue.c:7141:24: error: ‘PyThreadState’ {aka ‘struct _ts’} has no member named ‘exc_type’; did you mean ‘curexc_type’? 7141 | tmp_type = tstate->exc_type; | ^~~~ | curexc_type netfilterqueue.c:7142:25: error: ‘PyThreadState’ {aka ‘struct _ts’} has no member named ‘exc_value’; did you mean ‘curexc_value’? 7142 | tmp_value = tstate->exc_value; | ^~~~~ | curexc_value netfilterqueue.c:7143:22: error: ‘PyThreadState’ {aka ‘struct _ts’} has no member named ‘exc_traceback’; did you mean ‘curexc_traceback’? 7143 | tmp_tb = tstate->exc_traceback; | ^~~~~ | curexc_traceback netfilterqueue.c:7144:13: error: ‘PyThreadState’ {aka ‘struct _ts’} has no member named ‘exc_type’; did you mean ‘curexc_type’? 7144 | tstate->exc_type = type; | ^~~~ | curexc_type netfilterqueue.c:7145:13: error: ‘PyThreadState’ {aka ‘struct _ts’} has no member named ‘exc_value’; did you mean ‘curexc_value’? 7145 | tstate->exc_value = value; | ^~~~~ | curexc_value netfilterqueue.c:7146:13: error: ‘PyThreadState’ {aka ‘struct _ts’} has no member named ‘exc_traceback’; did you mean ‘curexc_traceback’? 7146 | tstate->exc_traceback = tb; | ^~~~~ | curexc_traceback netfilterqueue.c: In function ‘Pyx__GetException’: netfilterqueue.c:7201:24: error: ‘PyThreadState’ {aka ‘struct _ts’} has no member named ‘exc_type’; did you mean ‘curexc_type’? 7201 | tmp_type = tstate->exc_type; | ^~~~ | curexc_type netfilterqueue.c:7202:25: error: ‘PyThreadState’ {aka ‘struct _ts’} has no member named ‘exc_value’; did you mean ‘curexc_value’? 7202 | tmp_value = tstate->exc_value; | ^~~~~ | curexc_value netfilterqueue.c:7203:22: error: ‘PyThreadState’ {aka ‘struct _ts’} has no member named ‘exc_traceback’; did you mean ‘curexc_traceback’? 7203 | tmp_tb = tstate->exc_traceback; | ^~~~~ | curexc_traceback netfilterqueue.c:7204:13: error: ‘PyThreadState’ {aka ‘struct _ts’} has no member named ‘exc_type’; did you mean ‘curexc_type’? 7204 | tstate->exc_type = local_type; | ^~~~ | curexc_type netfilterqueue.c:7205:13: error: ‘PyThreadState’ {aka ‘struct _ts’} has no member named ‘exc_value’; did you mean ‘curexc_value’? 7205 | tstate->exc_value = local_value; | ^~~~~ | curexc_value netfilterqueue.c:7206:13: error: ‘PyThreadState’ {aka ‘struct _ts’} has no member named ‘exc_traceback’; did you mean ‘curexc_traceback’? 7206 | tstate->exc_traceback = local_tb; | ^~~~~ | curexc_traceback error: command 'x86_64-linux-gnu-gcc' failed with exit status 1


Failed building wheel for NetfilterQueue Running setup.py clean for NetfilterQueue Failed to build NetfilterQueue Installing collected packages: NetfilterQueue, pydivert Running setup.py install for NetfilterQueue ... error Complete output from command /usr/bin/python3 -u -c "import setuptools, tokenize;file='/tmp/pip-install-ynn0l5e_/NetfilterQueue/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-record-jk1h5c1v/install-record.txt --single-version-externally-managed --compile --user --prefix=: running install running build running build_ext building 'netfilterqueue' extension creating build creating build/temp.linux-x86_64-3.7 x86_64-linux-gnu-gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -g -fwrapv -O2 -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -I/usr/include/python3.7m -c netfilterqueue.c -o build/temp.linux-x86_64-3.7/netfilterqueue.o netfilterqueue.c: In function ‘__pyx_f_14netfilterqueue_6Packet_set_nfq_data’: netfilterqueue.c:2150:68: warning: passing argument 2 of ‘nfq_get_payload’ from incompatible pointer type [-Wincompatible-pointer-types] 2150 pyx_v_self->payload_len = nfq_get_payload(__pyx_v_self->_nfa, (&pyx_v_self->payload)); ~^~~~~~~
char **
In file included from netfilterqueue.c:440:
/usr/include/libnetfilter_queue/libnetfilter_queue.h:122:67: note: expected ‘unsigned char **’ but argument is of type ‘char **’
  122 | extern int nfq_get_payload(struct nfq_data *nfad, unsigned char **data);
      |                                                   ~~~~~~~~~~~~~~~~^~~~
netfilterqueue.c: In function ‘__pyx_pf_14netfilterqueue_6Packet_4get_hw’:
netfilterqueue.c:2533:17: warning: implicit declaration of function ‘PyString_FromStringAndSize’; did you mean ‘PyBytes_FromStringAndSize’? [-Wimplicit-function-declaration]
 2533 |     __pyx_t_3 = PyString_FromStringAndSize(((char *)__pyx_v_self->hw_addr), 8); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 111, __pyx_L1_error)
      |                 ^~~~~~~~~~~~~~~~~~~~~~~~~~
      |                 PyBytes_FromStringAndSize
netfilterqueue.c:2533:15: warning: assignment to ‘PyObject *’ {aka ‘struct _object *’} from ‘int’ makes pointer from integer without a cast [-Wint-conversion]
 2533 |     __pyx_t_3 = PyString_FromStringAndSize(((char *)__pyx_v_self->hw_addr), 8); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 111, __pyx_L1_error)
      |               ^
netfilterqueue.c: In function ‘__Pyx_PyCFunction_FastCall’:
netfilterqueue.c:6436:13: error: too many arguments to function ‘(PyObject * (*)(PyObject *, PyObject * const*, Py_ssize_t))meth’
 6436 |     return (*((__Pyx_PyCFunctionFast)meth)) (self, args, nargs, NULL);
      |            ~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
netfilterqueue.c: In function ‘__Pyx__ExceptionSave’:
netfilterqueue.c:7132:21: error: ‘PyThreadState’ {aka ‘struct _ts’} has no member named ‘exc_type’; did you mean ‘curexc_type’?
 7132 |     *type = tstate->exc_type;
      |                     ^~~~~~~~
      |                     curexc_type
netfilterqueue.c:7133:22: error: ‘PyThreadState’ {aka ‘struct _ts’} has no member named ‘exc_value’; did you mean ‘curexc_value’?
 7133 |     *value = tstate->exc_value;
      |                      ^~~~~~~~~
      |                      curexc_value
netfilterqueue.c:7134:19: error: ‘PyThreadState’ {aka ‘struct _ts’} has no member named ‘exc_traceback’; did you mean ‘curexc_traceback’?
 7134 |     *tb = tstate->exc_traceback;
      |                   ^~~~~~~~~~~~~
      |                   curexc_traceback
netfilterqueue.c: In function ‘__Pyx__ExceptionReset’:
netfilterqueue.c:7141:24: error: ‘PyThreadState’ {aka ‘struct _ts’} has no member named ‘exc_type’; did you mean ‘curexc_type’?
 7141 |     tmp_type = tstate->exc_type;
      |                        ^~~~~~~~
      |                        curexc_type
netfilterqueue.c:7142:25: error: ‘PyThreadState’ {aka ‘struct _ts’} has no member named ‘exc_value’; did you mean ‘curexc_value’?
 7142 |     tmp_value = tstate->exc_value;
      |                         ^~~~~~~~~
      |                         curexc_value
netfilterqueue.c:7143:22: error: ‘PyThreadState’ {aka ‘struct _ts’} has no member named ‘exc_traceback’; did you mean ‘curexc_traceback’?
 7143 |     tmp_tb = tstate->exc_traceback;
      |                      ^~~~~~~~~~~~~
      |                      curexc_traceback
netfilterqueue.c:7144:13: error: ‘PyThreadState’ {aka ‘struct _ts’} has no member named ‘exc_type’; did you mean ‘curexc_type’?
 7144 |     tstate->exc_type = type;
      |             ^~~~~~~~
      |             curexc_type
netfilterqueue.c:7145:13: error: ‘PyThreadState’ {aka ‘struct _ts’} has no member named ‘exc_value’; did you mean ‘curexc_value’?
 7145 |     tstate->exc_value = value;
      |             ^~~~~~~~~
      |             curexc_value
netfilterqueue.c:7146:13: error: ‘PyThreadState’ {aka ‘struct _ts’} has no member named ‘exc_traceback’; did you mean ‘curexc_traceback’?
 7146 |     tstate->exc_traceback = tb;
      |             ^~~~~~~~~~~~~
      |             curexc_traceback
netfilterqueue.c: In function ‘__Pyx__GetException’:
netfilterqueue.c:7201:24: error: ‘PyThreadState’ {aka ‘struct _ts’} has no member named ‘exc_type’; did you mean ‘curexc_type’?
 7201 |     tmp_type = tstate->exc_type;
      |                        ^~~~~~~~
      |                        curexc_type
netfilterqueue.c:7202:25: error: ‘PyThreadState’ {aka ‘struct _ts’} has no member named ‘exc_value’; did you mean ‘curexc_value’?
 7202 |     tmp_value = tstate->exc_value;
      |                         ^~~~~~~~~
      |                         curexc_value
netfilterqueue.c:7203:22: error: ‘PyThreadState’ {aka ‘struct _ts’} has no member named ‘exc_traceback’; did you mean ‘curexc_traceback’?
 7203 |     tmp_tb = tstate->exc_traceback;
      |                      ^~~~~~~~~~~~~
      |                      curexc_traceback
netfilterqueue.c:7204:13: error: ‘PyThreadState’ {aka ‘struct _ts’} has no member named ‘exc_type’; did you mean ‘curexc_type’?
 7204 |     tstate->exc_type = local_type;
      |             ^~~~~~~~
      |             curexc_type
netfilterqueue.c:7205:13: error: ‘PyThreadState’ {aka ‘struct _ts’} has no member named ‘exc_value’; did you mean ‘curexc_value’?
 7205 |     tstate->exc_value = local_value;
      |             ^~~~~~~~~
      |             curexc_value
netfilterqueue.c:7206:13: error: ‘PyThreadState’ {aka ‘struct _ts’} has no member named ‘exc_traceback’; did you mean ‘curexc_traceback’?
 7206 |     tstate->exc_traceback = local_tb;
      |             ^~~~~~~~~~~~~
      |             curexc_traceback
error: command 'x86_64-linux-gnu-gcc' failed with exit status 1

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

Command "/usr/bin/python3 -u -c "import setuptools, tokenize;file='/tmp/pip-install-ynn0l5e/NetfilterQueue/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-record-jk1h5c1v/install-record.txt --single-version-externally-managed --compile --user --prefix=" failed with error code 1 in /tmp/pip-install-ynn0l5e/NetfilterQueue/

LudwigEnglbrecht commented 4 years ago

Dear @nicolasaraya77 ,

probably you have already solved the problem and the issue can be closed. However, I had the same problem and found the solution from @shramos and @jJit0 within the following issue very useful.

With the following command I managed to install it :D :

pip3 install -U git+https://github.com/kti/python-netfilterqueue pip3 install -U polymorph # or: # pip3 install --process-dependency-links polymorph