Skip to content

Commit

Permalink
omogenise to windows dumps extension (dmp)
Browse files Browse the repository at this point in the history
  • Loading branch information
dsecuma committed Aug 8, 2024
1 parent 308c962 commit 54d76b4
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions analyzer/linux/analyzer.py
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ def dump_memory(pid):
try:
maps_file = open(f"/proc/{pid}/maps", "r")
mem_file = open(f"/proc/{pid}/mem", "rb", 0)
output_file = open(f"{MEM_PATH}/{pid}.dump", "wb")
output_file = open(f"{MEM_PATH}/{pid}.dmp", "wb")

for line in maps_file.readlines():
m = re.match(r"([0-9A-Fa-f]+)-([0-9A-Fa-f]+) ([-r])(\S+)\s+\d+\s+\S+\s+\d+\s*(.*)?", line)
Expand All @@ -126,8 +126,8 @@ def dump_memory(pid):
except PermissionError:
log.error(f"Permission denied to access process with PID {pid}.")

if os.path.exists(f"{MEM_PATH}/{pid}.dump"):
upload_to_host(f"{MEM_PATH}/{pid}.dump", f"memory/{pid}.dump")
if os.path.exists(f"{MEM_PATH}/{pid}.dmp"):
upload_to_host(f"{MEM_PATH}/{pid}.dmp", f"memory/{pid}.dmp")
DUMPED_LIST.add(pid)
else:
log.error(f"Memdump file not found in guest machine for PID {pid}")
Expand Down

0 comments on commit 54d76b4

Please sign in to comment.