ioccheck icon indicating copy to clipboard operation
ioccheck copied to clipboard

Bug in BehaviorPrinter.make_text()

Open ranguli opened this issue 4 years ago • 0 comments

    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

ranguli avatar Sep 24 '21 23:09 ranguli