#pip3 install selenium
from logging import error
from selenium import webdriver
from selenium.webdriver.support.ui import WebDriverWait

# Github credentials
username = "username"
password = "username"
for i in range(50):
    # initialize the Chrome driver
    driver = webdriver.Chrome(r"chromedriver")
    # head to github login page
    driver.get("https://github.com/login")
    # find username/email field and send the username itself to the input field
    driver.find_element_by_id("login_field").send_keys(username)
    # find password input field and insert password as well
    driver.find_element_by_id("password").send_keys(password)
    # click login button
    driver.find_element_by_name("commit").click()
    # wait the ready state to be complete
    WebDriverWait(driver=driver, timeout=10).until(
        lambda x: x.execute_script("return document.readyState === 'complete'")
)
    error_message = "Incorrect username or password."
    # get the errors (if there are)
    errors = driver.find_elements_by_class_name("flash-error")
    # print the errors optionally
    # for e in errors:
    #     print(e.text)
    # if we find that error message within errors, then login is failed
    if any(error_message in e.text for e in errors):
        print("[!] Login failed")
    else:
        print("[+] Login successful")

    # close the driver
    driver.close()

131bb9569fb5561bec1664246cc3d97d2a3e87dc
<mask token>

<mask token>
for i in range(50):
    driver = webdriver.Chrome('chromedriver')
    driver.get('https://github.com/login')
    driver.find_element_by_id('login_field').send_keys(username)
    driver.find_element_by_id('password').send_keys(password)
    driver.find_element_by_name('commit').click()
    WebDriverWait(driver=driver, timeout=10).until(lambda x: x.
        execute_script("return document.readyState === 'complete'"))
    error_message = 'Incorrect username or password.'
    errors = driver.find_elements_by_class_name('flash-error')
    if any(error_message in e.text for e in errors):
        print('[!] Login failed')
    else:
        print('[+] Login successful')
    driver.close()

<mask token>
username = 'username'
password = 'username'
for i in range(50):
    driver = webdriver.Chrome('chromedriver')
    driver.get('https://github.com/login')
    driver.find_element_by_id('login_field').send_keys(username)
    driver.find_element_by_id('password').send_keys(password)
    driver.find_element_by_name('commit').click()
    WebDriverWait(driver=driver, timeout=10).until(lambda x: x.
        execute_script("return document.readyState === 'complete'"))
    error_message = 'Incorrect username or password.'
    errors = driver.find_elements_by_class_name('flash-error')
    if any(error_message in e.text for e in errors):
        print('[!] Login failed')
    else:
        print('[+] Login successful')
    driver.close()

from logging import error
from selenium import webdriver
from selenium.webdriver.support.ui import WebDriverWait
username = 'username'
password = 'username'
for i in range(50):
    driver = webdriver.Chrome('chromedriver')
    driver.get('https://github.com/login')
    driver.find_element_by_id('login_field').send_keys(username)
    driver.find_element_by_id('password').send_keys(password)
    driver.find_element_by_name('commit').click()
    WebDriverWait(driver=driver, timeout=10).until(lambda x: x.
        execute_script("return document.readyState === 'complete'"))
    error_message = 'Incorrect username or password.'
    errors = driver.find_elements_by_class_name('flash-error')
    if any(error_message in e.text for e in errors):
        print('[!] Login failed')
    else:
        print('[+] Login successful')
    driver.close()

#pip3 install selenium
from logging import error
from selenium import webdriver
from selenium.webdriver.support.ui import WebDriverWait

# Github credentials
username = "username"
password = "username"
for i in range(50):
    # initialize the Chrome driver
    driver = webdriver.Chrome(r"chromedriver")
    # head to github login page
    driver.get("https://github.com/login")
    # find username/email field and send the username itself to the input field
    driver.find_element_by_id("login_field").send_keys(username)
    # find password input field and insert password as well
    driver.find_element_by_id("password").send_keys(password)
    # click login button
    driver.find_element_by_name("commit").click()
    # wait the ready state to be complete
    WebDriverWait(driver=driver, timeout=10).until(
        lambda x: x.execute_script("return document.readyState === 'complete'")
)
    error_message = "Incorrect username or password."
    # get the errors (if there are)
    errors = driver.find_elements_by_class_name("flash-error")
    # print the errors optionally
    # for e in errors:
    #     print(e.text)
    # if we find that error message within errors, then login is failed
    if any(error_message in e.text for e in errors):
        print("[!] Login failed")
    else:
        print("[+] Login successful")

    # close the driver
    driver.close()
