MCPcopy Index your code
hub / github.com/LCBOWER33/StegoScan / binary

Function binary

StegoScan.py:1249–1270  ·  view source on GitHub ↗
(output_dir)

Source from the content-addressed store, hash-verified

1247
1248
1249def binary(output_dir):
1250 bin_dir = os.path.join(output_dir, "bin")
1251 if os.path.isdir(bin_dir):
1252 for filename in tqdm(os.listdir(bin_dir), desc="Binary test: "):
1253 # print("IN BIN")
1254 f = os.path.join(bin_dir, filename)
1255 # checking if it is a file
1256 if os.path.isfile(f):
1257 # print(f)
1258 file_path = f
1259 """Run binwalk in WSL silently and capture output."""
1260 # wsl_file_path = file_path.replace("C:\\", "/mnt/c/").replace("\\", "/").lower()
1261 result = run_silent_command(f"binwalk {file_path}")
1262
1263 if result:
1264 binary_dir = os.path.join(results_folder, "binary")
1265 os.makedirs(binary_dir, exist_ok=True)
1266
1267 shutil.copy(file_path, f"{binary_dir}/{filename}")
1268 prYellow(f"Binwalk Output:\n {result}")
1269
1270 prGreen("BINARY TEST DONE")
1271
1272
1273def elf_check(output_dir):

Callers 2

start_progressFunction · 0.85
mainFunction · 0.85

Calls 3

run_silent_commandFunction · 0.85
prYellowFunction · 0.85
prGreenFunction · 0.85

Tested by

no test coverage detected