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

Function t_lsb

StegoScan.py:966–984  ·  view source on GitHub ↗
(output_dir)

Source from the content-addressed store, hash-verified

964
965# TODO add in the new test and replace one old
966def t_lsb(output_dir):
967 def process_file(f, filename):
968 try:
969 hidden_message = lsb.reveal(f)
970 lsb_dir = os.path.join(results_folder, "lsb")
971 os.makedirs(lsb_dir, exist_ok=True)
972 shutil.copy(f, os.path.join(lsb_dir, filename))
973 prGreen(f"[LSB] Hidden message detected in {filename}")
974 except:
975 pass
976
977 png_dir = os.path.join(output_dir, "png")
978 if os.path.isdir(png_dir):
979 files = [f for f in os.listdir(png_dir) if os.path.isfile(os.path.join(png_dir, f))]
980 with ThreadPoolExecutor(max_workers=os.cpu_count() - 1) as executor:
981 for filename in tqdm(files, desc="LSB test: "):
982 f = os.path.join(png_dir, filename)
983 executor.submit(process_file, f, filename)
984 prGreen("LSB TEST DONE")
985
986
987def image_integrity(output_dir):

Callers 2

start_progressFunction · 0.85
mainFunction · 0.85

Calls 1

prGreenFunction · 0.85

Tested by

no test coverage detected