gawen / virustotal

💊 VirusTotal Public API 2.0 client for Python 2.x
https://www.virustotal.com/
155 stars 61 forks source link

result.join fails if object unknown #9

Open bontchev opened 8 years ago

bontchev commented 8 years ago

If the scanned object (e.g., a hash) is not known to VirusTotal, result is set to None and result.join fails.

xakepnz commented 6 years ago

@bontchev

Here's some lines from Python, where 'remotesha' = a SHA256 hash. It's a little workaround, but it works...

        remotesha = sha256.hexdigest()
        report = v.get(remotesha)
        if report is None:
            print bcolors.FAIL,'\n[!] Failed: SHA256 Hash does not exist on Virustotal!\n',bcolors.ENDC
            exit(0)