47 script_path = os.path.abspath(__file__)
48 script_dir = os.path.dirname(script_path)
49 target_root = os.path.dirname(script_dir)
50
51 wanted =
set(TARGET_PROJECTS)
53
54 print(f"Scanning under: {target_root}")
55 print(f"Looking for: {', '.join(sorted(wanted))}")
56
57 changed_count = 0
58 for root, dirs, files in os.walk(target_root):
59
60 dirs[:] = [d for d in dirs if d not in EXCLUDED_DIR_NAMES]
61
62 for file in files:
63 if file in wanted:
64 filepath = os.path.join(root, file)
65 found.add(file)
66
67 if replace_in_file(filepath):
68 print(f"Updated: {filepath}")
69 changed_count += 1
70 else:
71 print(f"No matching text found, left unchanged: {filepath}")
72
73 missing = wanted - found
74 for name in sorted(missing):
75 print(f"Warning: not found anywhere under {target_root}: {name}")
76
77 print(f"Done. {changed_count} file(s) updated.")
78
79
followed by execute main
Definition command-parser-testcases.txt:284
set(SourceFiles "header/core/Core.h" "header/driver/Driver.h" "header/driver/Loader.h" "header/misc/Global.h" "header/pch.h" "code/core/Core.c" "code/driver/Driver.c" "code/driver/Ioctl.c" "code/driver/Loader.c") include_directories("../../../hyperdbg/include" "header") wdk_add_driver(hyperdbg_driver KMDF 1.15 $
Definition CMakeLists.txt:2