Skip to content

Instantly share code, notes, and snippets.

@crclz

crclz/bin.py Secret

Created January 11, 2021 11:33
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save crclz/8da1ff89b00575604eb3493e15abe76a to your computer and use it in GitHub Desktop.
Save crclz/8da1ff89b00575604eb3493e15abe76a to your computer and use it in GitHub Desktop.
with open('a.bin', 'rb') as f:
while True:
for length in [4, 2, 4]:
data = f.read(length)
if len(data) == 0:
exit(0)
print(int.from_bytes(data, byteorder='little'), end=' ')
print()
@dalei2019
Copy link

简单清晰。点赞。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment