Domanda Risolto Problemi installazione TheHarvester

Stato
Discussione chiusa ad ulteriori risposte.

Psychonaut

Utente Jade
17 Giugno 2012
1,492
89
743
747
Salve, sto provando ad installare TheHarvester su una VM con Ubuntu, seguo le indicazioni prese da GitHub ma quando ho fatto tutto e provo a lanciare il programma, mi dà in output il seguente errore inerente alle librerie di Python(è alla 3.7.5)
Bash:
(theHarvester) parallels@ed-virtualplatform:~/Documents/theHarvester$ python3.7 theHarvester.py -h
Traceback (most recent call last):
  File "theHarvester.py", line 12, in <module>
    from theHarvester import __main__
  File "/home/parallels/Documents/theHarvester/theHarvester/__main__.py", line 4, in <module>
    from theHarvester.discovery import dnssearch, takeover, shodansearch
  File "/home/parallels/Documents/theHarvester/theHarvester/discovery/dnssearch.py", line 14, in <module>
    from aiodns import DNSResolver
ModuleNotFoundError: No module named 'aiodns'

ho provato ad installare con pip il modulo aiodns, ma nulla.
 
con pip3 install aiodns avevo già provato ma non andava lo stesso, ho provato con sudo apt-get install python3-aiodns e sembra che l'abbia installato, il problema è che ora mi chiede un'altro modulo, e "pycares._cfficore", (pycares è già presente) quando provo a scaricarlo con pip o installarlo con Python non trova nessun pacchetto da scaricare.
 
Bash:
parallels@ed-virtualplatform:~/Documents/theHarvester$ sudo apt-get install python3 pycares._cfficore
[sudo] password for parallels:
Reading package lists... Done
Building dependency tree      
Reading state information... Done
E: Unable to locate package pycares._cfficore
E: Couldn't find any package by glob 'pycares._cfficore'
E: Couldn't find any package by regex 'pycares._cfficore'

Questo invece è l'output di pip
Bash:
parallels@ed-virtualplatform:~/Documents/theHarvester$ sudo pip3 install pycares._cfficore
WARNING: pip is being invoked by an old script wrapper. This will fail in a future version of pip.
Please see https://github.com/pypa/pip/issues/5599 for advice on fixing the underlying issue.
To avoid this problem you can invoke Python with '-m pip' instead of running pip directly.
WARNING: The directory '/home/parallels/.cache/pip' or its parent directory is not owned or is not writable by the current user. The cache has been disabled. Check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
ERROR: Could not find a version that satisfies the requirement pycares._cfficore (from versions: none)
ERROR: No matching distribution found for pycares._cfficore
 
sudo apt-get install python3-pycares
se ti capita un altro modulo mancante prova la stessa cosa fai apt-get install python3- o python- e il nome del modulo scrivi le prime lettere e premi tab per vedere i suggerimenti oppure usi apt-cache search "nome pacchetto"
 
mi dice che è già installato ma 7 pacchetti sono da aggiornare
Bash:
parallels@ed-virtualplatform:~/Documents/theHarvester$ sudo apt-get install python3-pycares
[sudo] password for parallels:
Reading package lists... Done
Building dependency tree       
Reading state information... Done
python3-pycares is already the newest version (2.1.1-2build2).
0 upgraded, 0 newly installed, 0 to remove and 7 not upgraded.
 
mi dice che è già installato ma 7 pacchetti sono da aggiornare
Bash:
parallels@ed-virtualplatform:~/Documents/theHarvester$ sudo apt-get install python3-pycares
[sudo] password for parallels:
Reading package lists... Done
Building dependency tree      
Reading state information... Done
python3-pycares is already the newest version (2.1.1-2build2).
0 upgraded, 0 newly installed, 0 to remove and 7 not upgraded.

Quando esegui lo script python che errore ti da?
 
Bash:
parallels@ed-virtualplatform:~/Documents/theHarvester$ python3.7 theHarvester.py -h
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/pycares/__init__.py", line 5, in <module>
    from ._core import *
ModuleNotFoundError: No module named 'pycares._core'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "theHarvester.py", line 12, in <module>
    from theHarvester import __main__
  File "/home/parallels/Documents/theHarvester/theHarvester/__main__.py", line 4, in <module>
    from theHarvester.discovery import dnssearch, takeover, shodansearch
  File "/home/parallels/Documents/theHarvester/theHarvester/discovery/dnssearch.py", line 14, in <module>
    from aiodns import DNSResolver
  File "/usr/lib/python3/dist-packages/aiodns/__init__.py", line 7, in <module>
    import pycares
  File "/usr/lib/python3/dist-packages/pycares/__init__.py", line 7, in <module>
    from ._cfficore import *
ModuleNotFoundError: No module named 'pycares._cfficore'
 
Questo è l'output
Bash:
parallels@ed-virtualplatform:~/Documents/theHarvester$ sudo pip install theHarvester
[sudo] password for parallels:
The directory '/home/parallels/.cache/pip/http' or its parent directory is not owned by the current user and the cache has been disabled. Please check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
The directory '/home/parallels/.cache/pip' or its parent directory is not owned by the current user and caching wheels has been disabled. check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
Collecting theHarvester
  Could not find a version that satisfies the requirement theHarvester (from versions: )
No matching distribution found for theHarvester

Con pip3 invece dà questo

Bash:
parallels@ed-virtualplatform:~/Documents/theHarvester$ sudo pip3 install theHarvester
WARNING: pip is being invoked by an old script wrapper. This will fail in a future version of pip.
Please see https://github.com/pypa/pip/issues/5599 for advice on fixing the underlying issue.
To avoid this problem you can invoke Python with '-m pip' instead of running pip directly.
WARNING: The directory '/home/parallels/.cache/pip' or its parent directory is not owned or is not writable by the current user. The cache has been disabled. Check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
Collecting theHarvester
  Downloading theHarvester-0.0.1-py3-none-any.whl (97 kB)
     |████████████████████████████████| 97 kB 1.4 MB/s
Installing collected packages: theHarvester
Successfully installed theHarvester-0.0.1
 
pip3 sembra che l'abbia installato prova ad eseguirlo vedi se ti da errori, scrivi solo theHarvester dovrebbe riconoscerti il comando ora se non esce premi tab
 
con python 3 mi dice questo
Bash:
parallels@ed-virtualplatform:~/Documents/theHarvester$ python3 theHarvester.py
[!] Make sure you have Python 3.7+ installed, quitting.
ho già installato Python3.7 e python3.8 quindi non so perché mi dia quest'output, se uso python3.7 mi dice che mancano i moduli che ti ho fatto vedere nei messaggi precedenti.
 
Codice:
sudo wget https://www.python.org/ftp/python/3.8.5/Python-3.8.5.tar.xz
tar -xf Python-3.8.5.tar.xz
cd Python-3.8.5
sudo apt-get install lzma-dev python3-dev build-essential libffi-dev libreadline-gplv2-dev libncursesw5-dev libssl-dev libsqlite3-dev tk-dev libgdbm-dev libc6-dev libbz2-dev
./configure
sudo make
sudo make install

cd ..
sudo git clone https://github.com/laramies/theHarvester.git
cd theHarvester
sudo python3.8 -m pip install -r requirements/base.txt
sudo python3.8 theHarvester.py

Ci ho messo un po ma eccoti tutti i passaggi per installarlo
 
  • Mi piace
Reazioni: Psychonaut
Ultima modifica:
Ha funzionato, grande :bananarock::bananarock:, cosa sbagliavo oltre l'utilizzo della versione di Python?
Messaggio unito automaticamente:

Quando lo lancio devo farlo senza richiamare python3.8?
 
Stato
Discussione chiusa ad ulteriori risposte.