Skip to content

Instantly share code, notes, and snippets.

@linuxbiekaisar
Last active June 28, 2024 21:05
Show Gist options
  • Save linuxbiekaisar/3bf452b25a03d513a3769c97de20dfeb to your computer and use it in GitHub Desktop.
Save linuxbiekaisar/3bf452b25a03d513a3769c97de20dfeb to your computer and use it in GitHub Desktop.
How to install theHarvester on Ubuntu 18.04 LTS
# Youtube: https://www.youtube.com/channel/UC8dSAxutoOJuoy7kExTd0AQ
# !/bin/sh
# use to git clon to download and clone the theHarvester from Github
git clone https://github.com/laramies/theHarvester
# Now enter into the theHarvester Folder
cd theHarvester
# Now install pip
sudo apt install python3-pip
# Now run the command if not donot work then run second one
python3.7 -m pip install -r requirements/dev.txt
# Else:
python3.7 -m pip install -r requirements/base.txt
# NOw run theHarvester
python3.7 theHarvester.py -h
# For Generating email list use this command
python3.7 theHarvester.py -d gmail.com -l 500 -b google
@Depgit
Copy link

Depgit commented Apr 25, 2023

dude, its not working, I already installed it and everything, but it always says: [!] Invalid source. someone knows whats wrong?

try this
python3 theHarvester.py -d google.com -b all

@networker12
Copy link

ok

@Ransomware0
Copy link

i have this error:

Traceback (most recent call last):
File "theHarvester.py", line 5, in
from theHarvester import main
File "/home/theHarv/theHarvester/theHarvester/main.py", line 4, in
from theHarvester.discovery import dnssearch, takeover, shodansearch
File "/home/theHarv/theHarvester/theHarvester/discovery/dnssearch.py", line 17, in
from theHarvester.lib import hostchecker
File "/home/theHarv/theHarvester/theHarvester/lib/hostchecker.py", line 14, in
class Checker:
File "/home/theHarv/theHarvester/theHarvester/lib/hostchecker.py", line 37, in Checker
BaseException | Any, BaseException | Any, BaseException | Any, BaseException | Any, BaseException | Any]:
TypeError: unsupported operand type(s) for |: 'type' and '_SpecialForm'

some solution?

@cboychinedu
Copy link

i have this error:

Traceback (most recent call last): File "theHarvester.py", line 5, in from theHarvester import main File "/home/theHarv/theHarvester/theHarvester/main.py", line 4, in from theHarvester.discovery import dnssearch, takeover, shodansearch File "/home/theHarv/theHarvester/theHarvester/discovery/dnssearch.py", line 17, in from theHarvester.lib import hostchecker File "/home/theHarv/theHarvester/theHarvester/lib/hostchecker.py", line 14, in class Checker: File "/home/theHarv/theHarvester/theHarvester/lib/hostchecker.py", line 37, in Checker BaseException | Any, BaseException | Any, BaseException | Any, BaseException | Any, BaseException | Any]: TypeError: unsupported operand type(s) for |: 'type' and '_SpecialForm'

some solution?

you are using anaconda, that is why you are getting the following errors.

install python using apt-get, and use the default install, this should solve the problem.

@Tyr0806
Copy link

Tyr0806 commented Jun 28, 2024

I tried following the above steps, but received this message:

error: externally-managed-environment

× This environment is externally managed
╰─> To install Python packages system-wide, try apt install
    python3-xyz, where xyz is the package you are trying to
    install.
    
    If you wish to install a non-Debian-packaged Python package,
    create a virtual environment using python3 -m venv path/to/venv.
    Then use path/to/venv/bin/python and path/to/venv/bin/pip. Make
    sure you have python3-full installed.
    
    If you wish to install a non-Debian packaged Python application,
    it may be easiest to use pipx install xyz, which will manage a
    virtual environment for you. Make sure you have pipx installed.
    
    See /usr/share/doc/python3.12/README.venv for more information.

note: If you believe this is a mistake, please contact your Python installation or OS distribution provider. You can override this, at the risk of breaking your Python installation or OS, by passing --break-system-packages.
hint: See PEP 668 for the detailed specification.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment