(output_dir)
| 1091 | |
| 1092 | |
| 1093 | def jpeg(output_dir): |
| 1094 | # TODO replace with another tool as stegdetect is out of date |
| 1095 | jpg_dir = os.path.join(output_dir, "jpg") |
| 1096 | if os.path.isdir(jpg_dir): |
| 1097 | for filename in tqdm(os.listdir(jpg_dir), desc="JPEG test: "): |
| 1098 | f = os.path.join(jpg_dir, filename) |
| 1099 | # checking if it is a file |
| 1100 | if os.path.isfile(f): |
| 1101 | # print(f) |
| 1102 | image_path = f |
| 1103 | """Run stegdetect in WSL silently and capture output.""" |
| 1104 | # wsl_image_path = image_path.replace("C:\\", "/mnt/c/").replace("\\", "/").lower() |
| 1105 | result = run_silent_command(f"stegdetect -t o {image_path}") |
| 1106 | |
| 1107 | # Only print results if stegdetect finds something |
| 1108 | if result: |
| 1109 | jpeg_dir = os.path.join(results_folder, "jpeg") |
| 1110 | os.makedirs(jpeg_dir, exist_ok=True) |
| 1111 | |
| 1112 | shutil.copy(image_path, f"{jpeg_dir}/{filename}") |
| 1113 | prGreen(f"Stegdetect Output:\n {result}") |
| 1114 | |
| 1115 | prGreen("JPEG TEST DONE") |
| 1116 | |
| 1117 | |
| 1118 | def png(output_dir): |
no test coverage detected