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
ImportError attempted relative import with no known parent package (is this python2 or python3?) #119
While following the instructions, I was having issues running python3 setup.py install due to the following error:
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/VHostScan
copying build/lib/VHostScan/__init__.py -> build/bdist.linux-x86_64/egg/VHostScan
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/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
copying build/lib/VHostScan/wordlists/hackthebox.txt -> build/bdist.linux-x86_64/egg/VHostScan/wordlists
creating 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/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/helpers/file_helper.py -> 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/__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/__version__.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/discovered_host.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/ua-random-list.txt -> build/bdist.linux-x86_64/egg/VHostScan/lib
copying build/lib/VHostScan/VHostScan.py -> build/bdist.linux-x86_64/egg/VHostScan
creating 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/test_file_helper.py -> 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_wordlist_helper.py -> build/bdist.linux-x86_64/egg/tests/helpers
copying build/lib/tests/conftest.py -> build/bdist.linux-x86_64/egg/tests
copying build/lib/tests/__init__.py -> build/bdist.linux-x86_64/egg/tests
byte-compiling build/bdist.linux-x86_64/egg/VHostScan/__init__.py to __init__.cpython-38.pyc
byte-compiling build/bdist.linux-x86_64/egg/VHostScan/lib/input.py to input.cpython-38.pyc
byte-compiling build/bdist.linux-x86_64/egg/VHostScan/lib/helpers/output_helper.py to output_helper.cpython-38.pyc
byte-compiling build/bdist.linux-x86_64/egg/VHostScan/lib/helpers/file_helper.py to file_helper.cpython-38.pyc
byte-compiling build/bdist.linux-x86_64/egg/VHostScan/lib/helpers/__init__.py to __init__.cpython-38.pyc
byte-compiling build/bdist.linux-x86_64/egg/VHostScan/lib/helpers/wordlist_helper.py to wordlist_helper.cpython-38.pyc
byte-compiling build/bdist.linux-x86_64/egg/VHostScan/lib/__init__.py to __init__.cpython-38.pyc
byte-compiling build/bdist.linux-x86_64/egg/VHostScan/lib/core/__version__.py to __version__.cpython-38.pyc
byte-compiling build/bdist.linux-x86_64/egg/VHostScan/lib/core/__init__.py to __init__.cpython-38.pyc
byte-compiling build/bdist.linux-x86_64/egg/VHostScan/lib/core/discovered_host.py to discovered_host.cpython-38.pyc
byte-compiling build/bdist.linux-x86_64/egg/VHostScan/lib/core/virtual_host_scanner.py to virtual_host_scanner.cpython-38.pyc
byte-compiling build/bdist.linux-x86_64/egg/VHostScan/VHostScan.py to VHostScan.cpython-38.pyc
byte-compiling build/bdist.linux-x86_64/egg/tests/test_input.py to test_input.cpython-38.pyc
byte-compiling build/bdist.linux-x86_64/egg/tests/helpers/test_file_helper.py to test_file_helper.cpython-38.pyc
byte-compiling build/bdist.linux-x86_64/egg/tests/helpers/__init__.py to __init__.cpython-38.pyc
byte-compiling build/bdist.linux-x86_64/egg/tests/helpers/test_wordlist_helper.py to test_wordlist_helper.cpython-38.pyc
byte-compiling build/bdist.linux-x86_64/egg/tests/conftest.py to conftest.cpython-38.pyc
byte-compiling build/bdist.linux-x86_64/egg/tests/__init__.py to __init__.cpython-38.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
creating 'dist/VHostScan-1.21-py3.8.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.8.egg
removing '/usr/local/lib/python3.8/dist-packages/VHostScan-1.21-py3.8.egg' (and everything under it)
creating /usr/local/lib/python3.8/dist-packages/VHostScan-1.21-py3.8.egg
Extracting VHostScan-1.21-py3.8.egg to /usr/local/lib/python3.8/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.8/dist-packages/VHostScan-1.21-py3.8.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-gjwdn1sb/pandas-0.19.2/setup.cfg
Running pandas-0.19.2/setup.py -q bdist_egg --dist-dir /tmp/easy_install-gjwdn1sb/pandas-0.19.2/egg-dist-tmp-b1p8avd1
UPDATING build/lib.linux-x86_64-3.8/pandas/_version.py
set build/lib.linux-x86_64-3.8/pandas/_version.py to '0.19.2'
However, I ran across this GitHub issue which mentioned running python2 setup.py install, which is not in the instructions.
While that command completed and everything installed successfully, I now have issues trying to run VHostScan.py with both python2 and python3, as shown in the examples below:
⚡ root@kali ~/test/VHostScan/VHostScan master ./VHostScan.py 5:19PM/06.02
Traceback (most recent call last):
File "./VHostScan.py", line 8, in <module>
from .lib.core.virtual_host_scanner import virtual_host_scanner
ImportError: attempted relative import with no known parent package
✘ ⚡ root@kali ~/test/VHostScan/VHostScan master python2 ./VHostScan.py 5:19PM/06.02
Traceback (most recent call last):
File "./VHostScan.py", line 8, in <module>
from .lib.core.virtual_host_scanner import virtual_host_scanner
ValueError: Attempted relative import in non-package
✘ ⚡ root@kali ~/test/VHostScan/VHostScan master python3 ./VHostScan.py 5:21PM/06.02
Traceback (most recent call last):
File "./VHostScan.py", line 8, in <module>
from .lib.core.virtual_host_scanner import virtual_host_scanner
ImportError: attempted relative import with no known parent package
While following the instructions, I was having issues running
python3 setup.py install
due to the following error:However, I ran across this GitHub issue which mentioned running
python2 setup.py install
, which is not in the instructions.While that command completed and everything installed successfully, I now have issues trying to run
VHostScan.py
with both python2 and python3, as shown in the examples below:Any help would be greatly appreciated.