Python

XOR Binary


程式碼

#!/usr/bin/python
import os
import sys

i = open('input_enc', 'rb')
o = open('output_dec', 'w+b')
byte = i.read(1)
while byte != '':
  byte = ord(byte) ^ 0xff
  o.write('%c' % byte)
  byte = i.read(1)
o.close()


返回上一頁