ioccheck
ioccheck copied to clipboard
Bug in BehaviorPrinter.make_text()
def make_text(self) -> Optional[str]:
table = [["Vendor", "Behaviour", "Threat"]]
for result in self.ioc.behavior: # type: ignore
if result.threat is None:
continue
if result.threat == 1:
threat = colored("Neutral", "green")
elif result.threat == 2:
threat = colored("Suspicious", "yellow")
elif result.threat == 3:
threat = colored("Malicious", "red")
table.append([result.vendor, result.behavior, threat])
if len(table) == 1:
return None
return tabulate(table, tablefmt="fancy_grid")
result has no attribute threat