diff --git a/a.out b/a.out new file mode 100755 index 0000000..48ed55c Binary files /dev/null and b/a.out differ diff --git a/src/detections/hash.py b/src/detections/hash.py index 0a68656..0d42da4 100644 --- a/src/detections/hash.py +++ b/src/detections/hash.py @@ -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 diff --git a/src/main.py b/src/main.py index a4f0bc5..36c5ea4 100644 --- a/src/main.py +++ b/src/main.py @@ -2,4 +2,4 @@ from scanner import Scanner scanner = Scanner() -scanner.scan_file("virus") \ No newline at end of file +scanner.scan_file("a.out") \ No newline at end of file