[ create a new paste ] login | about

Link: http://codepad.org/aUrlcbk2    [ raw code | fork ]

ramandi - Python, pasted on Aug 11:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
a="iVBORw0KGgoAAAANSUhEUgAAAAkAAAAJCAIAAABv85FHAAABB0lEQVR4nAH8AAP/APXX7L74zhsb6Bni6gjRu84PCwPnFRrD/iQJEADp+fop4w7/ClXcP1SiE/cmvMOp+MHm/T7ppegA1O7CJP/IGQvj+xTHyPU3uRbJ6gA34E3f4dNfAOsR5vkP0TXLIO7E3uYm1Auzux4bx+fsD9bN9QD3IbM6yxDkNLjgussk5SUKCxXK1dMIHKPVMf8A2REc1MHrOtrT962///YfuB++E8fdDzAQoanoAOKODsDtBa31xuj6IizvxQYV3AIv4+wkxgy1vgAJFqLRFxD7HQCh7MwE3Aq0qwzg6yr69d28AtUBnV1+0/HzLiLX19o25jfnBP/hIDkMDBUX3YAUC0mGddt48B4AAAAASUVORK5CYII="
open("hackit1.png","wb").write(a.decode('base64'))

from PIL import Image

fich=Image.open("hackit1.png")

password=''
for x in range(9):
 for c in range(3):
  cand=0
  for y in range(8,-1,-1):
   color=fich.getpixel((x,y))[c]
   print cand, color
   if color>cand: cand=max(color,cand)-min(color,cand)
   else: cand+=color
  password+=chr(cand)

print password


Create a new paste based on this one


Comments: