-
-
Notifications
You must be signed in to change notification settings - Fork 161
Open
Labels
bugSomething isn't workingSomething isn't working
Description
Description
The domain_report() method can return None in certain conditions, causing a TypeError when the caller tries to index the result.
Location
- File:
vt.py, lines 62-101 - Caller:
opensquat.py, lines 106-110
Problem
When calling vt.VirusTotal().main(domain):
total_votes = vt.VirusTotal().main(domain)
harmless = total_votes[0] # TypeError if total_votes is None
malicious = total_votes[1]The domain_report() method returns None if the API response is 200 but the expected data structure is missing.
Suggested Fix
- Return a default value like
[0, -1]when data is missing - Or add
Nonecheck in the caller before indexing
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working