Skip to content

Commit

Permalink
Adding logingmail.py and root.sh
Browse files Browse the repository at this point in the history
  • Loading branch information
root committed Jan 18, 2019
1 parent a6d18e4 commit b5f2740
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 0 deletions.
24 changes: 24 additions & 0 deletions logingmail.py
@@ -0,0 +1,24 @@
import time, os
from selenium import webdriver
emailPath = "email.txt"
passwordPath = "pass.txt"
codePath = "code.txt"
femail = open(emailPath, "r")
email = femail.readline()
fpass = open(passwordPath, "r")
password = fpass.readline()
driver = webdriver.Firefox()
driver.get("https://www.gmail.com")
driver.find_element_by_name("identifier").send_keys(email.split("\n")[0])
driver.find_element_by_id("identifierNext").click()
time.sleep(1);
driver.find_element_by_name("password").send_keys(password.split("\n")[0])
driver.find_element_by_id("passwordNext").click()
while not os.path.exists(codePath):
time.sleep(1)
fcode = open(codePath, "r")
code = fcode.readline()
driver.find_element_by_name("idvPin").send_keys(code.split("\n")[0])
driver.find_element_by_id("idvPreregisteredPhoneNext").click()


5 changes: 5 additions & 0 deletions root.sh
@@ -0,0 +1,5 @@
#!/bin/sh
# script that runs as root
# The display number must be a desktop session valid, you can view with echo $DISPLAY
export PATH=$PATH:/bin/geckodriver
DISPLAY=:1 python logingmail.py &

0 comments on commit b5f2740

Please sign in to comment.