aboul3la / Sublist3r

Fast subdomains enumeration tool for penetration testers
GNU General Public License v2.0
9.48k stars 2.07k forks source link

Fix for VirusTotal error #285

Open crahan opened 3 years ago

crahan commented 3 years ago

This PR fixes the outdated VirusTotal API endpoint which has been reported in https://github.com/aboul3la/Sublist3r/issues/194. It uses the value specified in the VT_APIKEYenvironment variable. If the the API key is missing, it prints an error message and skips the VirusTotal engine.

Screen Shot 2020-11-22 at 00 38 26
GiangTieuDau commented 3 years ago

I did fix accordingly to yours And I also changed VT_APIKEY into my API key But the error keep showing [!] Error: VirusTotal API key environment variable not found. Skipping

How to fix that?

crahan commented 3 years ago

@GiangTieuDau try the following on lines 690 and 691.

self.headers.update({'X-ApiKey': self.apikey})
print(self.headers)
resp = self.session.get(url, headers=self.headers, timeout=self.timeout)
print(resp.json())

And check the value of the headers you're sending and the response JSON that gets returned. Either the API key is not being sent, the API is not correct and causes an error, or some other error is happening. Printing either of those values should get you more details.

RoninNakomoto commented 3 years ago

I did fix accordingly to yours And I also changed VT_APIKEY into my API key But the error keep showing [!] Error: VirusTotal API key environment variable not found. Skipping

How to fix that? @GiangTieuDau @crahan export the API KEY And run the tool without the sudo. It will solve ur problem. you are running the tool as sudo while you're exporting the API_KEY into the current user's environment.

Mayor294 commented 2 years ago

[!] Error: Virustotal probably now is blocking our requests

😑😑😑😑😑.... Someone help me out Thank You

ashifly commented 2 years ago

Worked for me. Thank you :))

owenrrr commented 1 year ago

This actually helps me thx!

SkySlic3 commented 11 months ago

@GiangTieuDau try the following on lines 690 and 691.

self.headers.update({'X-ApiKey': self.apikey})
print(self.headers)
resp = self.session.get(url, headers=self.headers, timeout=self.timeout)
print(resp.json())

And check the value of the headers you're sending and the response JSON that gets returned. Either the API key is not being sent, the API is not correct and causes an error, or some other error is happening. Printing either of those values should get you more details.

Where do I type this into

soukainazay commented 10 months ago

it's not working for me i've tried all the things discussed, can any one help me out please :(

soukainazay commented 10 months ago

@GiangTieuDau try the following on lines 690 and 691.

self.headers.update({'X-ApiKey': self.apikey})
print(self.headers)
resp = self.session.get(url, headers=self.headers, timeout=self.timeout)
print(resp.json())

And check the value of the headers you're sending and the response JSON that gets returned. Either the API key is not being sent, the API is not correct and causes an error, or some other error is happening. Printing either of those values should get you more details.

Where do I type this into

in the Sublist3r.py file (type gedit ./sublist3r.py to modify) i've tried it and it's not working for me. did u find another way to solve this?