From 5ae84cc98dc9ab2bee4d26d9b53d79b8f12ece4d Mon Sep 17 00:00:00 2001 From: Kevin O'Reilly Date: Mon, 19 Aug 2024 08:32:43 +0100 Subject: [PATCH] Analyzer: Fix key error with recent TTD integration --- analyzer/windows/lib/api/process.py | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/analyzer/windows/lib/api/process.py b/analyzer/windows/lib/api/process.py index 04d171b3324..e4b2b6f7592 100644 --- a/analyzer/windows/lib/api/process.py +++ b/analyzer/windows/lib/api/process.py @@ -565,7 +565,10 @@ def set_terminate_event(self): log.info("Termination confirmed for %s", self) KERNEL32.CloseHandle(self.terminate_event_handle) - ttd = int(self.options.get("ttd", 0) + try: + ttd = int(self.options.get("ttd", 0)) + except (ValueError, TypeError): + ttd = 0 if ttd: self.ttd_stop() @@ -694,7 +697,10 @@ def inject(self, interest=None, nosleepskip=False): log.warning("invalid path %s for monitor DLL to be injected in %s, injection aborted", dll, self) return False - ttd = int(self.options.get("ttd", 0) + try: + ttd = int(self.options.get("ttd", 0)) + except (ValueError, TypeError): + ttd = 0 if ttd: self.options["no-iat"] = 1