You didn't edit the following line to include the name of your .env file. I used the name virus_total.env
# load_dotenv will look for a .env file and if it finds one it will load the environment variables from it
load_dotenv("virus_total.env")
"""
///// IMPORTANT /////
ADD .env to gitignore to keep it from being sent to github
and exposing your API key in the repository
"""
In this .env file, you need a line as follows (as an example only):
API_KEY1="5da36e3aa622a8b6d81dd168334ef12379bdad4d1fa7f11ce3f75829ccc5e9ac"
You get this api key from your account on the virus total website.
Then, you will get the following result
python vt-ip-url-analysis.py -s google.com
google.com
community score 0/96 : security vendors flagged this as mali...
last_analysis_date Wed Nov 6 16:04:21 2024
last_analysis_stats {'malicious': 0, 'suspicious': 0, 'undetected'...
redirection_chain [http://google.com/]
reputation 2700
times_submitted 200860
tld com
virustotal report https://www.virustotal.com/gui/url/cf4b367e49b...