In [1]:rf = open('masked_key.png', 'r')
In [2]:mk = rf.read()
In [3]:rf.close()
In [4]:key = bytearray(mk[-64:])
In [5]:png = bytearray(mk[:-64])
In [6]:for byte in xrange(len(png)):
...:png[byte] ^= key[byte % 64]
...: In [7]:wf = open('key.png', 'w')
In [8]:wf.write(png)
In [9]:wf.close()
No comments:
Post a Comment