Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #Auto_Login_website
- from selenium import webdriver
- import getpass
- def loginBOT(usr, pas):
- br = webdriver.Firefox()
- br.get("https://web.facebook.com/")
- user = br.find_element_by_name("email")
- user.clear()
- user.send_keys(usr)
- passwd = br.find_element_by_name("pass")
- passwd.clear()
- passwd.send_keys(pas)
- btn = br.find_element_by_css_selector("#u_0_2")
- btn.click()
- if __name__ == "__main__":
- with open("hack_list.txt") as f:
- for i, line in enumerate(f):
- line = line.strip()
- print('line {:3d}: {}'.format(i, line))
- if len(line) > 0:
- # this will only run when the line is NOT empty
- data, _ = line.split('#')
- usr, pwd = data.split(':')
- usr = usr.strip()
- pwd = pwd.strip()
- print('line {:3d} usr: {}'.format(i, usr))
- print('line {:3d} pwd: {}'.format(i, pwd))
- loginBOT(usr, pwd)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement