fix crash
This commit is contained in:
@@ -19,7 +19,7 @@ class Hash(Detection):
|
||||
console.print(f"[d] - MD5: {md5}\n - SHA1: {sha1}\n - SHA256: {sha256}[/]")
|
||||
|
||||
for virus_name, virus_hashes in hashes.items():
|
||||
if virus_hashes["md5"] == md5 or virus_hashes["sha1"] == sha1 or virus_hashes["sha256"] == sha256:
|
||||
if virus_hashes.get("md5", None) == md5 or virus_hashes.get("sha1", None) == sha1 or virus_hashes.get("sha256", None) == sha256:
|
||||
console.print(f"[bold orange1]⚠️ HASH MATCH: {virus_name} DETECTED")
|
||||
return True
|
||||
|
||||
|
||||
@@ -2,4 +2,4 @@ from scanner import Scanner
|
||||
|
||||
|
||||
scanner = Scanner()
|
||||
scanner.scan_file("virus")
|
||||
scanner.scan_file("a.out")
|
||||
Reference in New Issue
Block a user