Python os.path module precisely does that by checking the current platform and, based on it, utilizes either the posixpath or ntpath modules

This commit is contained in:
Gustavo Moreira
2024-02-02 17:03:14 +11:00
parent 6f1e7c2145
commit 260fbd8d24
+1 -6
View File
@@ -12,7 +12,6 @@ import sys
import shutil
import tempfile
import hashlib
import ntpath
import json
#
@@ -125,11 +124,7 @@ def test_windows_dumpfiles(image, volatility, python):
known_files = json.load(json_file)
failed_chksms = 0
if sys.platform == "win32":
file_name = ntpath.basename(image)
else:
file_name = os.path.basename(image)
file_name = os.path.basename(image)
try:
for addr in known_files["windows_dumpfiles"][file_name]: