codingo / VHostScan

A virtual host scanner that performs reverse lookups, can be used with pivot tools, detect catch-all scenarios, work around wildcards, aliases and dynamic default pages.
GNU General Public License v3.0
1.19k stars 231 forks source link

setup.py cant finish installation #112

Closed mario713 closed 5 years ago

mario713 commented 5 years ago

Hi, Im trying to install VHostScan on my kali linux virtual machine with command python3 setup.py install and im getting an error. My python 3 version: Python 3.7.4

My versions of pip libs installed:

Name: dnspython
Version: 1.16.0
Name: fuzzywuzzy
Version: 0.17.0
Name: numpy
Version: 1.12.0
Name: pandas
Version: 0.24.2
Name: requests
Version: 2.21.0
Name: simplejson
Version: 3.16.0
Name: urllib3
Version: 1.24.1

And here is the console output after running install command:

running install
running bdist_egg
running egg_info
writing VHostScan.egg-info/PKG-INFO
writing dependency_links to VHostScan.egg-info/dependency_links.txt
writing entry points to VHostScan.egg-info/entry_points.txt
writing requirements to VHostScan.egg-info/requires.txt
writing top-level names to VHostScan.egg-info/top_level.txt
reading manifest file 'VHostScan.egg-info/SOURCES.txt'
reading manifest template 'MANIFEST.in'
writing manifest file 'VHostScan.egg-info/SOURCES.txt'
installing library code to build/bdist.linux-x86_64/egg
running install_lib
running build_py
creating build/bdist.linux-x86_64/egg
creating build/bdist.linux-x86_64/egg/tests
copying build/lib/tests/__init__.py -> build/bdist.linux-x86_64/egg/tests
copying build/lib/tests/test_input.py -> build/bdist.linux-x86_64/egg/tests
creating build/bdist.linux-x86_64/egg/tests/helpers
copying build/lib/tests/helpers/__init__.py -> build/bdist.linux-x86_64/egg/tests/helpers
copying build/lib/tests/helpers/test_file_helper.py -> build/bdist.linux-x86_64/egg/tests/helpers
copying build/lib/tests/helpers/test_wordlist_helper.py -> build/bdist.linux-x86_64/egg/tests/helpers
copying build/lib/tests/conftest.py -> build/bdist.linux-x86_64/egg/tests
creating build/bdist.linux-x86_64/egg/VHostScan
copying build/lib/VHostScan/__init__.py -> build/bdist.linux-x86_64/egg/VHostScan
copying build/lib/VHostScan/VHostScan.py -> build/bdist.linux-x86_64/egg/VHostScan
creating build/bdist.linux-x86_64/egg/VHostScan/lib
copying build/lib/VHostScan/lib/__init__.py -> build/bdist.linux-x86_64/egg/VHostScan/lib
creating build/bdist.linux-x86_64/egg/VHostScan/lib/core
copying build/lib/VHostScan/lib/core/discovered_host.py -> build/bdist.linux-x86_64/egg/VHostScan/lib/core
copying build/lib/VHostScan/lib/core/__init__.py -> build/bdist.linux-x86_64/egg/VHostScan/lib/core
copying build/lib/VHostScan/lib/core/virtual_host_scanner.py -> build/bdist.linux-x86_64/egg/VHostScan/lib/core
copying build/lib/VHostScan/lib/core/__version__.py -> build/bdist.linux-x86_64/egg/VHostScan/lib/core
creating build/bdist.linux-x86_64/egg/VHostScan/lib/helpers
copying build/lib/VHostScan/lib/helpers/__init__.py -> build/bdist.linux-x86_64/egg/VHostScan/lib/helpers
copying build/lib/VHostScan/lib/helpers/wordlist_helper.py -> build/bdist.linux-x86_64/egg/VHostScan/lib/helpers
copying build/lib/VHostScan/lib/helpers/file_helper.py -> build/bdist.linux-x86_64/egg/VHostScan/lib/helpers
copying build/lib/VHostScan/lib/helpers/output_helper.py -> build/bdist.linux-x86_64/egg/VHostScan/lib/helpers
copying build/lib/VHostScan/lib/ua-random-list.txt -> build/bdist.linux-x86_64/egg/VHostScan/lib
copying build/lib/VHostScan/lib/input.py -> build/bdist.linux-x86_64/egg/VHostScan/lib
creating build/bdist.linux-x86_64/egg/VHostScan/wordlists
copying build/lib/VHostScan/wordlists/testing.txt -> build/bdist.linux-x86_64/egg/VHostScan/wordlists
copying build/lib/VHostScan/wordlists/hackthebox.txt -> build/bdist.linux-x86_64/egg/VHostScan/wordlists
copying build/lib/VHostScan/wordlists/simple.txt -> build/bdist.linux-x86_64/egg/VHostScan/wordlists
copying build/lib/VHostScan/wordlists/virtual-host-scanning.txt -> build/bdist.linux-x86_64/egg/VHostScan/wordlists
byte-compiling build/bdist.linux-x86_64/egg/tests/__init__.py to __init__.cpython-37.pyc
byte-compiling build/bdist.linux-x86_64/egg/tests/test_input.py to test_input.cpython-37.pyc
byte-compiling build/bdist.linux-x86_64/egg/tests/helpers/__init__.py to __init__.cpython-37.pyc
byte-compiling build/bdist.linux-x86_64/egg/tests/helpers/test_file_helper.py to test_file_helper.cpython-37.pyc
byte-compiling build/bdist.linux-x86_64/egg/tests/helpers/test_wordlist_helper.py to test_wordlist_helper.cpython-37.pyc
byte-compiling build/bdist.linux-x86_64/egg/tests/conftest.py to conftest.cpython-37.pyc
byte-compiling build/bdist.linux-x86_64/egg/VHostScan/__init__.py to __init__.cpython-37.pyc
byte-compiling build/bdist.linux-x86_64/egg/VHostScan/VHostScan.py to VHostScan.cpython-37.pyc
byte-compiling build/bdist.linux-x86_64/egg/VHostScan/lib/__init__.py to __init__.cpython-37.pyc
byte-compiling build/bdist.linux-x86_64/egg/VHostScan/lib/core/discovered_host.py to discovered_host.cpython-37.pyc
byte-compiling build/bdist.linux-x86_64/egg/VHostScan/lib/core/__init__.py to __init__.cpython-37.pyc
byte-compiling build/bdist.linux-x86_64/egg/VHostScan/lib/core/virtual_host_scanner.py to virtual_host_scanner.cpython-37.pyc
byte-compiling build/bdist.linux-x86_64/egg/VHostScan/lib/core/__version__.py to __version__.cpython-37.pyc
byte-compiling build/bdist.linux-x86_64/egg/VHostScan/lib/helpers/__init__.py to __init__.cpython-37.pyc
byte-compiling build/bdist.linux-x86_64/egg/VHostScan/lib/helpers/wordlist_helper.py to wordlist_helper.cpython-37.pyc
byte-compiling build/bdist.linux-x86_64/egg/VHostScan/lib/helpers/file_helper.py to file_helper.cpython-37.pyc
byte-compiling build/bdist.linux-x86_64/egg/VHostScan/lib/helpers/output_helper.py to output_helper.cpython-37.pyc
byte-compiling build/bdist.linux-x86_64/egg/VHostScan/lib/input.py to input.cpython-37.pyc
creating build/bdist.linux-x86_64/egg/EGG-INFO
copying VHostScan.egg-info/PKG-INFO -> build/bdist.linux-x86_64/egg/EGG-INFO
copying VHostScan.egg-info/SOURCES.txt -> build/bdist.linux-x86_64/egg/EGG-INFO
copying VHostScan.egg-info/dependency_links.txt -> build/bdist.linux-x86_64/egg/EGG-INFO
copying VHostScan.egg-info/entry_points.txt -> build/bdist.linux-x86_64/egg/EGG-INFO
copying VHostScan.egg-info/requires.txt -> build/bdist.linux-x86_64/egg/EGG-INFO
copying VHostScan.egg-info/top_level.txt -> build/bdist.linux-x86_64/egg/EGG-INFO
zip_safe flag not set; analyzing archive contents...
tests.__pycache__.conftest.cpython-37: module references __file__
creating 'dist/VHostScan-1.21-py3.7.egg' and adding 'build/bdist.linux-x86_64/egg' to it
removing 'build/bdist.linux-x86_64/egg' (and everything under it)
Processing VHostScan-1.21-py3.7.egg
removing '/usr/local/lib/python3.7/dist-packages/VHostScan-1.21-py3.7.egg' (and everything under it)
creating /usr/local/lib/python3.7/dist-packages/VHostScan-1.21-py3.7.egg
Extracting VHostScan-1.21-py3.7.egg to /usr/local/lib/python3.7/dist-packages
VHostScan 1.21 is already the active version in easy-install.pth
Installing VHostScan script to /usr/local/bin

Installed /usr/local/lib/python3.7/dist-packages/VHostScan-1.21-py3.7.egg
Processing dependencies for VHostScan==1.21
Searching for pandas==0.19.2
Reading https://pypi.org/simple/pandas/
Downloading https://files.pythonhosted.org/packages/08/9d/31ec596099f14528fc6ad39428248ac5360f0bb5205a3ee79a5d1cf260fb/pandas-0.19.2.tar.gz#sha256=6f0f4f598c2b16746803c8bafef7c721c57e4844da752d36240c0acf97658014
Best match: pandas 0.19.2
Processing pandas-0.19.2.tar.gz
Writing /tmp/easy_install-fxu1xzgv/pandas-0.19.2/setup.cfg
Running pandas-0.19.2/setup.py -q bdist_egg --dist-dir /tmp/easy_install-fxu1xzgv/pandas-0.19.2/egg-dist-tmp-hnrj4t85
package init file 'pandas/io/tests/sas/__init__.py' not found (or not a regular file)
warning: no files found matching 'README.rst'
no previously-included directories found matching 'doc/build'
warning: no directories found matching 'examples'
warning: no previously-included files matching '*.so' found anywhere in distribution
warning: no previously-included files matching '*.pyd' found anywhere in distribution
warning: no previously-included files matching '*.pyc' found anywhere in distribution
warning: no previously-included files matching '*~' found anywhere in distribution
warning: no previously-included files matching '#*' found anywhere in distribution
warning: no previously-included files matching '.git*' found anywhere in distribution
warning: no previously-included files matching '.DS_Store' found anywhere in distribution
warning: no previously-included files matching '*.png' found anywhere in distribution
package init file 'pandas/io/tests/sas/__init__.py' not found (or not a regular file)
package init file 'pandas/io/tests/sas/__init__.py' not found (or not a regular file)
UPDATING build/lib.linux-x86_64-3.7/pandas/_version.py
set build/lib.linux-x86_64-3.7/pandas/_version.py to '0.19.2'
In file included from /usr/lib/python3/dist-packages/numpy/core/include/numpy/ndarraytypes.h:1822,
                 from /usr/lib/python3/dist-packages/numpy/core/include/numpy/ndarrayobject.h:12,
                 from /usr/lib/python3/dist-packages/numpy/core/include/numpy/arrayobject.h:4,
                 from pandas/lib.c:274:
/usr/lib/python3/dist-packages/numpy/core/include/numpy/npy_1_7_deprecated_api.h:17:2: warning: #warning "Using deprecated NumPy API, disable it with " "#define NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION" [-Wcpp]
 #warning "Using deprecated NumPy API, disable it with " \
  ^~~~~~~
In file included from pandas/lib.c:280:
pandas/src/numpy_helper.h: In function ‘transfer_object_column’:
pandas/src/numpy_helper.h:152:19: warning: comparison of integer expressions of different signedness: ‘int’ and ‘size_t’ {aka ‘long unsigned int’} [-Wsign-compare]
     for (i = 0; i < length; ++i)
                   ^
In file included from /usr/include/python3.7m/Python.h:120,
                 from pandas/lib.c:4:
pandas/lib.c: In function ‘__pyx_f_6pandas_3lib_slice_get_indices_ex’:
pandas/lib.c:28309:37: warning: passing argument 1 of ‘PySlice_Unpack’ from incompatible pointer type [-Wincompatible-pointer-types]
   __pyx_t_4 = PySlice_GetIndicesEx(((PySliceObject *)__pyx_v_slc), __pyx_v_objlen, (&__pyx_v_start), (&__pyx_v_stop), (&__pyx_v_step), (&__pyx_v_length)); if (unlikely(__pyx_t_4 == -1)) __PYX_ERR(0, 1723, __pyx_L1_error)
/usr/include/python3.7m/sliceobject.h:49:21: note: in definition of macro ‘PySlice_GetIndicesEx’
     PySlice_Unpack((slice), (start), (stop), (step)) < 0 ?                  \
                     ^~~~~
/usr/include/python3.7m/sliceobject.h:53:42: note: expected ‘PyObject *’ {aka ‘struct _object *’} but argument is of type ‘PySliceObject *’ {aka ‘struct <anonymous> *’}
 PyAPI_FUNC(int) PySlice_Unpack(PyObject *slice,
                                ~~~~~~~~~~^~~~~
pandas/lib.c: In function ‘__pyx_f_6pandas_3lib_slice_len’:
pandas/lib.c:28532:37: warning: passing argument 1 of ‘PySlice_Unpack’ from incompatible pointer type [-Wincompatible-pointer-types]
   __pyx_t_4 = PySlice_GetIndicesEx(((PySliceObject *)__pyx_v_slc), __pyx_v_objlen, (&__pyx_v_start), (&__pyx_v_stop), (&__pyx_v_step), (&__pyx_v_length)); if (unlikely(__pyx_t_4 == -1)) __PYX_ERR(0, 1747, __pyx_L1_error)
/usr/include/python3.7m/sliceobject.h:49:21: note: in definition of macro ‘PySlice_GetIndicesEx’
     PySlice_Unpack((slice), (start), (stop), (step)) < 0 ?                  \
                     ^~~~~
/usr/include/python3.7m/sliceobject.h:53:42: note: expected ‘PyObject *’ {aka ‘struct _object *’} but argument is of type ‘PySliceObject *’ {aka ‘struct <anonymous> *’}
 PyAPI_FUNC(int) PySlice_Unpack(PyObject *slice,
                                ~~~~~~~~~~^~~~~
pandas/lib.c: In function ‘__Pyx__ExceptionSave’:
pandas/lib.c:91809:21: error: ‘PyThreadState’ {aka ‘struct _ts’} has no member named ‘exc_type’; did you mean ‘curexc_type’?
     *type = tstate->exc_type;
                     ^~~~~~~~
                     curexc_type
pandas/lib.c:91810:22: error: ‘PyThreadState’ {aka ‘struct _ts’} has no member named ‘exc_value’; did you mean ‘curexc_value’?
     *value = tstate->exc_value;
                      ^~~~~~~~~
                      curexc_value
pandas/lib.c:91811:19: error: ‘PyThreadState’ {aka ‘struct _ts’} has no member named ‘exc_traceback’; did you mean ‘curexc_traceback’?
     *tb = tstate->exc_traceback;
                   ^~~~~~~~~~~~~
                   curexc_traceback
pandas/lib.c: In function ‘__Pyx__ExceptionReset’:
pandas/lib.c:91818:24: error: ‘PyThreadState’ {aka ‘struct _ts’} has no member named ‘exc_type’; did you mean ‘curexc_type’?
     tmp_type = tstate->exc_type;
                        ^~~~~~~~
                        curexc_type
pandas/lib.c:91819:25: error: ‘PyThreadState’ {aka ‘struct _ts’} has no member named ‘exc_value’; did you mean ‘curexc_value’?
     tmp_value = tstate->exc_value;
                         ^~~~~~~~~
                         curexc_value
pandas/lib.c:91820:22: error: ‘PyThreadState’ {aka ‘struct _ts’} has no member named ‘exc_traceback’; did you mean ‘curexc_traceback’?
     tmp_tb = tstate->exc_traceback;
                      ^~~~~~~~~~~~~
                      curexc_traceback
pandas/lib.c:91821:13: error: ‘PyThreadState’ {aka ‘struct _ts’} has no member named ‘exc_type’; did you mean ‘curexc_type’?
     tstate->exc_type = type;
             ^~~~~~~~
             curexc_type
pandas/lib.c:91822:13: error: ‘PyThreadState’ {aka ‘struct _ts’} has no member named ‘exc_value’; did you mean ‘curexc_value’?
     tstate->exc_value = value;
             ^~~~~~~~~
             curexc_value
pandas/lib.c:91823:13: error: ‘PyThreadState’ {aka ‘struct _ts’} has no member named ‘exc_traceback’; did you mean ‘curexc_traceback’?
     tstate->exc_traceback = tb;
             ^~~~~~~~~~~~~
             curexc_traceback
pandas/lib.c: In function ‘__Pyx__GetException’:
pandas/lib.c:92129:24: error: ‘PyThreadState’ {aka ‘struct _ts’} has no member named ‘exc_type’; did you mean ‘curexc_type’?
     tmp_type = tstate->exc_type;
                        ^~~~~~~~
                        curexc_type
pandas/lib.c:92130:25: error: ‘PyThreadState’ {aka ‘struct _ts’} has no member named ‘exc_value’; did you mean ‘curexc_value’?
     tmp_value = tstate->exc_value;
                         ^~~~~~~~~
                         curexc_value
pandas/lib.c:92131:22: error: ‘PyThreadState’ {aka ‘struct _ts’} has no member named ‘exc_traceback’; did you mean ‘curexc_traceback’?
     tmp_tb = tstate->exc_traceback;
                      ^~~~~~~~~~~~~
                      curexc_traceback
pandas/lib.c:92132:13: error: ‘PyThreadState’ {aka ‘struct _ts’} has no member named ‘exc_type’; did you mean ‘curexc_type’?
     tstate->exc_type = local_type;
             ^~~~~~~~
             curexc_type
pandas/lib.c:92133:13: error: ‘PyThreadState’ {aka ‘struct _ts’} has no member named ‘exc_value’; did you mean ‘curexc_value’?
     tstate->exc_value = local_value;
             ^~~~~~~~~
             curexc_value
pandas/lib.c:92134:13: error: ‘PyThreadState’ {aka ‘struct _ts’} has no member named ‘exc_traceback’; did you mean ‘curexc_traceback’?
     tstate->exc_traceback = local_tb;
             ^~~~~~~~~~~~~
             curexc_traceback
pandas/lib.c: In function ‘__Pyx__ExceptionSwap’:
pandas/lib.c:92975:24: error: ‘PyThreadState’ {aka ‘struct _ts’} has no member named ‘exc_type’; did you mean ‘curexc_type’?
     tmp_type = tstate->exc_type;
                        ^~~~~~~~
                        curexc_type
pandas/lib.c:92976:25: error: ‘PyThreadState’ {aka ‘struct _ts’} has no member named ‘exc_value’; did you mean ‘curexc_value’?
     tmp_value = tstate->exc_value;
                         ^~~~~~~~~
                         curexc_value
pandas/lib.c:92977:22: error: ‘PyThreadState’ {aka ‘struct _ts’} has no member named ‘exc_traceback’; did you mean ‘curexc_traceback’?
     tmp_tb = tstate->exc_traceback;
                      ^~~~~~~~~~~~~
                      curexc_traceback
pandas/lib.c:92978:13: error: ‘PyThreadState’ {aka ‘struct _ts’} has no member named ‘exc_type’; did you mean ‘curexc_type’?
     tstate->exc_type = *type;
             ^~~~~~~~
             curexc_type
pandas/lib.c:92979:13: error: ‘PyThreadState’ {aka ‘struct _ts’} has no member named ‘exc_value’; did you mean ‘curexc_value’?
     tstate->exc_value = *value;
             ^~~~~~~~~
             curexc_value
pandas/lib.c:92980:13: error: ‘PyThreadState’ {aka ‘struct _ts’} has no member named ‘exc_traceback’; did you mean ‘curexc_traceback’?
     tstate->exc_traceback = *tb;
             ^~~~~~~~~~~~~
             curexc_traceback
error: Setup script exited with error: command 'x86_64-linux-gnu-gcc' failed with exit status 1
codingo commented 5 years ago

You're missing a package, specifically x86_64-linux-gnu-gcc, I'm guessing you're installing this on a new (non Kali) debian distribution?

The following should resolve this and allow setup to continue without hassle:

$ sudo apt-get install python-dev
mario713 commented 5 years ago

Thanks for quick reply. No, Im installing it on Kali Linux(image downloaded no more than 30 days ago), and I already did that sudo apt-get install python-dev before posting here and it didn't helped.

///EDIT/// I also have python 2.7 installed, could that be an issue?

And after typing apt show python-dev command im getting this output:

root@kali:~/git/VHostScan# apt show python-dev
Package: python-dev
Version: 2.7.16-1
Priority: optional
Section: python
Source: python-defaults
Maintainer: Matthias Klose <doko@debian.org>
Installed-Size: 15.4 kB
Depends: python (= 2.7.16-1), libpython-dev (= 2.7.16-1), python2.7-dev (>= 2.7.16-1~), python2-dev (= 2.7.16-1)
Homepage: https://www.python.org/
Tag: devel::lang:python, devel::library, implemented-in::python,
 role::devel-lib
Download-Size: 1,192 B
APT-Manual-Installed: yes
APT-Sources: http://http.kali.org/kali kali-rolling/main amd64 Packages
Description: header files and a static library for Python2
 Header files, a static library and development tools for building
 Python2 modules, extending the Python2 interpreter or embedding Python2
 in applications.
 .
 This package is a dependency package, which depends on Debian's Python2
 version (currently v2.7).
codingo commented 5 years ago

Ah, gotcha. I'll download a fresh image tomorrow and take a proper look.

mario713 commented 5 years ago

Ok so I managed to finish this installation. Before I was installing it by python3 setup.py install command but after editing my second post and thinking for a while I decided to try python setup.py install and it worked. I have 2 versions of python installed

root@kali:~# python --version
Python 2.7.16+
root@kali:~# python3 --version
Python 3.7.4
codingo commented 5 years ago

Makes sense. Nice one! Let me know how you get on with VHostScan and if there's anything else I can add to make it better for you.