Skip to content

Instantly share code, notes, and snippets.

@ywkw1717
Created May 26, 2019 12:16
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 ywkw1717/83b2656e26137360dd06aebef7e04d3a to your computer and use it in GitHub Desktop.
Save ywkw1717/83b2656e26137360dd06aebef7e04d3a to your computer and use it in GitHub Desktop.
#!/usr/bin/env python
import struct
def main():
l = []
with open('./flag_oct', 'r') as f:
for i in f:
l = i.split(' ')
with open('flag', 'wb') as f:
for i in l:
f.write(struct.pack("B", int(i, 8)))
if __name__ == "__main__":
main()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment