can scan for function calls now
This commit is contained in:
@@ -4,6 +4,8 @@ from console import console
|
||||
from rich.table import Table
|
||||
from time import time
|
||||
|
||||
import os
|
||||
|
||||
|
||||
class Scanner:
|
||||
def __init__(self):
|
||||
@@ -22,13 +24,11 @@ class Scanner:
|
||||
table = Table("Scan", "Match")
|
||||
|
||||
for name, detection in self.detections.items():
|
||||
start_time = time()
|
||||
console.print(f"[d]Running {name}..", end='\r')
|
||||
console.print(f"Running {name}..")
|
||||
|
||||
match = detection.run(contents, f)
|
||||
match = detection.run(contents, f, os.path.realpath(file_path))
|
||||
table.add_row(name, "[bold orange1]⚠️ Match" if match else "[bold green]✅ Clean")
|
||||
|
||||
console.print(f"Running {name}.. [d]({round(time()-start_time, 3)}s)", highlight=False)
|
||||
print()
|
||||
|
||||
f.close()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user