logo

eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee

Unnamed repository; edit this file 'description' to name the repository. git clone https://hacktivis.me/git/mirror/eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee.git

2E.py (540B)


  1. #!/usr/bin/env python3.7
  2. import sys
  3. if len(sys.argv) is not 3:
  4. print('usage : 2E.py [input file] [output file]')
  5. exit(-1)
  6. inFile = open(sys.argv[1], mode='rb')
  7. outFile = open(sys.argv[2], mode='w')
  8. for buffer in iter(lambda: inFile.read(1), b''):
  9. binStr = bin(int(buffer.hex(), base=16))[2:].zfill(8)
  10. for c in binStr:
  11. if c == '1':
  12. outFile.write('E')
  13. elif c == '0':
  14. outFile.write('e')
  15. else:
  16. print('error!')
  17. exit(-1)
  18. inFile.close()
  19. outFile.close()