Advertisement
Guest User

Untitled

a guest
Dec 8th, 2016
82
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.51 KB | None | 0 0
  1. async def log_in(websocket, challstr):
  2. logfile = open("id.txt")
  3. username = logfile.readline()[:-1]
  4. password = logfile.readline()[:-1]
  5. logfile.close()
  6. datastr = "act=login&name=" + username + "&pass=" + password + "&challstr=" + challstr
  7. resp = requests.post("http://play.pokemonshowdown.com/action.php", data=datastr)
  8.  
  9. async def stringing(websocket, string_tab): # string_tab : socket message splited on '|'
  10. if string_tab[1] == "challstr":
  11. await log_in(websocket, string_tab[3])
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement