Skip to content

Commit

Permalink
Merge pull request #19 from VirusTotal/change-dmp-ext
Browse files Browse the repository at this point in the history
omogenise to windows dumps extension (dmp)
  • Loading branch information
dsecuma authored Aug 8, 2024
2 parents 308c962 + 54d76b4 commit 6d799df
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 6d799df

Please sign in to comment.