13o-bbr-bbq / machine_learning_security

Source code about machine learning and security.
1.96k stars 648 forks source link

Invalid IP Address #4

Closed pieterhouwen closed 6 years ago

pieterhouwen commented 6 years ago

When running DeepExploit, I'm getting the following output..

Using TensorFlow backend. RuntimeError: module compiled against API version 0xc but this version of numpy is 0xb RuntimeError: module compiled against API version 0xc but this version of numpy is 0xb [*] Invalid IP address: 192.168.2.7

Am I doing something wrong?

13o-bbr-bbq commented 6 years ago

@pieterhouwen Maybe, your python environment has two numpy. This error message display that two numpy are competing. Please try you following.

Is it matching?

pieterhouwen commented 6 years ago

Hi thanks for your reply, yes both of them show version 1.13.3

13o-bbr-bbq commented 6 years ago

@pieterhouwen Thanks for reply. Could you change the name of one "numpy" as following?

cd "your python directory"/lib/python/
sudo mv numpy numpy_bad
pieterhouwen commented 6 years ago

I have changed one , and then the other but still nothing, here's some of my output:

root@supersecretkali:/opt/exploitation/machine_learning_security/DeepExploit# cd / && find -name numpy | more ./usr/local/lib/python2.7/dist-packages/pandas-0.20.1-py2.7-linux-x86_64.egg/pan das/compat/numpy ./usr/lib/python2.7/dist-packages/numpy ./usr/lib/python2.7/dist-packages/numpy/core/include/numpy ./usr/lib/python3/dist-packages/numpy_bad/core/include/numpy ./usr/share/numpy ./usr/include/python2.7/numpy ./usr/include/python3.6m/numpy ./usr/include/numpy

root@supersecretkali:/usr/lib/python3/dist-packages# mv numpy numpy_bad

root@supersecretkali:/usr/lib/python2.7/dist-packages# mv numpy numpy_bad root@supersecretkali:/usr/lib/python2.7/dist-packages# cd /opt/exploitation/machine_learning_security/DeepExploit/ root@supersecretkali:/opt/exploitation/machine_learning_security/DeepExploit# python DeepExploit.py -t 192.168.2.2 -m train Traceback (most recent call last): File "DeepExploit.py", line 17, in import numpy as np ImportError: No module named numpy root@supersecretkali:/opt/exploitation/machine_learning_security/DeepExploit# echo numpy==1.13.3 >req.txt root@supersecretkali:/opt/exploitation/machine_learning_security/DeepExploit# pip install -r req.txt Requirement already satisfied: numpy==1.13.3 in /usr/lib/python2.7/dist-packages (from -r req.txt (line 1)) root@supersecretkali:/opt/exploitation/machine_learning_security/DeepExploit# ls /usr/lib/python2.7/dist-packages/ | grep numpy numpy-1.13.3.egg-info numpy_bad root@supersecretkali:/opt/exploitation/machine_learning_security/DeepExploit# rm /usr/lib/python2.7/dist-packages/numpy-1.13.3.egg-info/\

rm: cannot remove '/usr/lib/python2.7/dist-packages/numpy-1.13.3.egg-info/': Is a directory root@supersecretkali:/opt/exploitation/machine_learning_security/DeepExploit# rm -r /usr/lib/python2.7/dist-packages/numpy-1.13.3.egg-info/ root@supersecretkali:/opt/exploitation/machine_learning_security/DeepExploit# pip install -r req.txt Collecting numpy==1.13.3 (from -r req.txt (line 1)) Downloading numpy-1.13.3-cp27-cp27mu-manylinux1_x86_64.whl (16.6MB) 100% |████████████████████████████████| 16.7MB 75kB/s Installing collected packages: numpy Successfully installed numpy-1.13.3 root@supersecretkali:/opt/exploitation/machine_learning_security/DeepExploit# python DeepExploit.py -t 192.168.2.2 -m train Using TensorFlow backend. RuntimeError: module compiled against API version 0xc but this version of numpy is 0xb RuntimeError: module compiled against API version 0xc but this version of numpy is 0xb [*] Invalid IP address: 192.168.2.2 root@supersecretkali:/opt/exploitation/machine_learning_security/DeepExploit#

fanntom commented 6 years ago

Hi I posted the solution to this issue in my issue thread.

13o-bbr-bbq commented 6 years ago

Thanks @fanntom !!

pieterhouwen commented 6 years ago

@fanntom Indeed, thank you!