forensics/endianness_v2

This commit is contained in:
Oystein Kristoffer Tveit 2024-09-05 19:25:07 +02:00
parent 94acd9d239
commit 147cc5ec57
Signed by: oysteikt
GPG Key ID: 9F2F7D8250F35146
3 changed files with 16 additions and 0 deletions

Binary file not shown.

View File

@ -0,0 +1 @@
picoCTF{cert!f1Ed_iNd!4n_s0rrY_3nDian_188d7b8c}

View File

@ -0,0 +1,15 @@
#!/usr/bin/env python3
with open('challengefile', 'rb') as file:
content = file.read()
def chunks(l, n):
for i in range(0, len(l), n):
yield l[i:i + n]
buffer = []
for word in chunks(content, 4):
buffer.append(bytes(reversed(word)))
with open('challengefile.jpg', 'wb') as file:
file.write(b''.join(buffer))