Pythonchallenge Level 18 (python 2.7)
the difference between these two images are brightness level, hence go to the 'brightness.html'download 'delta.gz' and unzip the file
look into the dataset, the regular stuff would come out...
>>> import gzip
>>> f=gzip.open('/home/****/Downloads/deltas.gz')
>>> data=f.read()
>>> data=data.splitlines()
>>> import difflib
>>> left=[]
>>> right=[]
>>> for row in data:
left.append(row)
right.append(row)
>>> diff=list(difflib.ndiff(left,right))
>>> add_data=['']
>>> minus_data=['']
>>> space_data=['']
>>> for temp in diff:
s=temp
t=[]
for b in temp.split():
t.append(chr((int(b,16))))
n.append(s)
if s=='+':
add_data+=''.join(t)
elif s=='-':
minus_data+=''.join(t)
else:
space_data+=''.join(t)
>>> open('add.png','wb').write(add_data)
>>> open('minus.png','wb').write(minus_data)
>>> open('space.png','wb').write(space_data)
the username is 'butter' password is 'fly' and the url is '../hex/bin.html'
页:
[1]