Advertisement
Guest User

Untitled

a guest
Aug 8th, 2017
65
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.66 KB | None | 0 0
  1. import sys
  2. import telnetlib
  3. import time
  4.  
  5. HOST = "200.51.203.232"
  6. PORT = 6112
  7. user = "..."
  8. upass = "..."
  9.  
  10. tn = telnetlib.Telnet(HOST, PORT)
  11.  
  12. tn.write("\r\n")
  13.  
  14. tn.expect(["Username:"], 1);
  15.  
  16. print tn.read_eager()
  17. tn.write(user + "\r\n")
  18.  
  19. tn.expect(["Password:"], 1);
  20.  
  21. print tn.read_lazy()
  22. tn.write(upass + "\r\n")
  23.  
  24. a = "";
  25. while 1:
  26.     a = a + tn.read_eager()
  27.     if ("\r\n" in a):
  28.         v = a[1:a.find("\r")]
  29.         if ("Your unique name:" in v):
  30.             tn.write("/join Diablo II\r\n")
  31.             tn.write("/lusers\r\n")
  32.         if ("Banned users:" in v):
  33.             list = v[v.find(":")+2:].split(" ")
  34.             for name in list:
  35.                 print "hi:"+name
  36.         a = a[a.find("\r")+1:]
  37.         print v
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement