Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions analyzer/windows/modules/packages/archive.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ class Archive(Package):
"""Archive analysis package."""

PATHS = [
("SystemRoot", "system32", "msiexec.exe"),
("SystemRoot", "system32", "cmd.exe"),
("SystemRoot", "system32", "wscript.exe"),
("SystemRoot", "system32", "rundll32.exe"),
Expand Down
1 change: 1 addition & 0 deletions analyzer/windows/modules/packages/zip.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ class Zip(Package):
"""Zip analysis package."""

PATHS = [
("SystemRoot", "system32", "msiexec.exe"),
("SystemRoot", "system32", "cmd.exe"),
("SystemRoot", "system32", "wscript.exe"),
("SystemRoot", "system32", "rundll32.exe"),
Expand Down
14 changes: 9 additions & 5 deletions lib/cuckoo/core/analysis_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -422,11 +422,15 @@
options["clock"] = self.db.update_clock(self.task.id)
self.db.guest_set_status(self.task.id, "starting")
guest_manager.start_analysis(options)
if guest_manager.get_status_from_db() == "starting":
guest_manager.set_status_in_db("running")
guest_manager.wait_for_completion()

guest_manager.set_status_in_db("stopping")

Check failure on line 425 in lib/cuckoo/core/analysis_manager.py

View workflow job for this annotation

GitHub Actions / test (3.10)

Ruff (W293)

lib/cuckoo/core/analysis_manager.py:425:1: W293 Blank line contains whitespace
try:
if guest_manager.get_status_from_db() == "starting":
guest_manager.set_status_in_db("running")
guest_manager.wait_for_completion()
guest_manager.set_status_in_db("stopping")
except Exception as e:
guest_manager.set_status_in_db("failed")
self.log.exception(f"Unknown exception waiting for guest completion: {e}")

Check failure on line 433 in lib/cuckoo/core/analysis_manager.py

View workflow job for this annotation

GitHub Actions / test (3.10)

Ruff (G004)

lib/cuckoo/core/analysis_manager.py:433:32: G004 Logging statement uses f-string

return

Expand Down
5 changes: 1 addition & 4 deletions utils/process.py
Original file line number Diff line number Diff line change
Expand Up @@ -225,12 +225,9 @@ def doRollover(self):
Override doRollover to force close the old handler before creating a new one.
"""
if self.stream:
logging.debug("Flushing log stream...")
self.stream.flush()
logging.debug("Closing log stream...")
self.stream.close()
logging.debug("Log stream closed.")
logging.handlers.TimedRotatingFileHandler.doRollover(self)
super().doRollover()


def init_logging(debug=False):
Expand Down
Loading