forensics/corrupted_file

This commit is contained in:
2026-07-02 01:10:44 +09:00
parent 4fb7dba3b5
commit e3bc9568b3
3 changed files with 17 additions and 0 deletions
Binary file not shown.
+1
View File
@@ -0,0 +1 @@
picoCTF{r3st0r1ng_th3_by73s_efd8c6c0}
+16
View File
@@ -0,0 +1,16 @@
#!/usr/bin/env python3
from pathlib import Path
def main():
with (Path(__file__).parent / "file").open('rb') as file:
content = file.read()
JFIF_MAGIC_BYTES = b"\xFF\xD8"
new_content = JFIF_MAGIC_BYTES + content[2:]
with (Path(__file__).parent / "file.jpg").open('wb') as file:
file.write(new_content)
if __name__ == '__main__':
main()