(self)
Enumerate all behavior logs.
Enumerate all behavior logs.
Enumerate all behavior logs .
def _enum_logs(self):
        """Enumerate all behavior logs."""
        if not os.path.exists(self.logs_path):
            log.warning("Analysis results folder does not exist at path %r.", self.logs_path)
            return

        logs = os.listdir(self.logs_path)
        if not logs:
            log.warning("Analysis results folder does not contain any behavior log files.")
            return

        for fname in logs:
            path = os.path.join(self.logs_path, fname)
            if not os.path.isfile(path):
                log.warning("Behavior log file %r is not a file.", fname)
                continue

            limit = config("cuckoo:processing:analysis_size_limit")
            if limit and os.stat(path).st_size > limit:
                # This needs to be a big alert.
                log.critical("Behavior log file %r is too big, skipped.", fname)
                continue

            yield path
def _enum_logs ( self ) : if not os . path . exists ( self . logs_path ) : log . warning ( "Analysis results folder does not exist at path %r." , self . logs_path ) return logs = os . listdir ( self . logs_path ) if not logs : log . warning ( "Analysis results folder does not contain any behavior log files." ) return for fname in logs : path = os . path . join ( self . logs_path , fname ) if not os . path . isfile ( path ) : log . warning ( "Behavior log file %r is not a file." , fname ) continue limit = config ( "cuckoo:processing:analysis_size_limit" ) if limit and os . stat ( path ) . st_size > limit : # This needs to be a big alert. log . critical ( "Behavior log file %r is too big, skipped." , fname ) continue yield path