forensics/binary_digits

This commit is contained in:
2026-07-02 00:45:26 +09:00
parent b2a684df66
commit 6ae768454c
3 changed files with 20 additions and 0 deletions
File diff suppressed because one or more lines are too long
+1
View File
@@ -0,0 +1 @@
picoCTF{h1dd3n_1n_th3_b1n4ry_d4e39e9e}
+18
View File
@@ -0,0 +1,18 @@
#!/usr/bin/env python3
from pathlib import Path
from textwrap import wrap
def main():
with (Path(__file__).parent / "digits.bin").open('r') as file:
content = file.read()
chunks = wrap(content, width = 8)
digits = [int(chunk, 2) for chunk in chunks]
# file out.jpg reveals type
with (Path(__file__).parent / "out.jpg").open('wb') as file:
file.write(bytes(digits))
if __name__ == '__main__':
main()