Skip to content

Instantly share code, notes, and snippets.

@primus852
Created February 7, 2022 13:30
Show Gist options
  • Save primus852/0b5625b006fcd848ce6f4644f7c48c03 to your computer and use it in GitHub Desktop.
Save primus852/0b5625b006fcd848ce6f4644f7c48c03 to your computer and use it in GitHub Desktop.
import random
import time
import requests
from selenium import webdriver
from selenium.webdriver.chrome.options import Options
from selenium.webdriver.chrome.service import Service
from selenium.webdriver.common.by import By
from webdriver_manager.chrome import ChromeDriverManager
word_site = "https://www.mit.edu/~ecprice/wordlist.10000"
response = requests.get(word_site)
WORDS = response.content.splitlines()
# create webdriver object
s = Service(ChromeDriverManager().install())
options = Options()
options.headless = True
driver = webdriver.Chrome(service=s, options=options)
driver.get("https://verifyme.cloud/")
iteration = 1
while True:
# get element
elements = driver.find_elements(By.CLASS_NAME, "cmAzHq")
element = random.choice(elements)
element.click()
wordCount = random.randint(4, 12)
i = 0
word_string = ''
while i <= wordCount:
i += 1
word_string += str(random.choice(WORDS)).replace('b\'', '').replace('\'', '') + ' '
# Wait for "init"
time.sleep(3)
textarea = driver.find_element(By.ID, "phraseText").send_keys(word_string.strip())
time.sleep(1)
button = driver.find_element(By.XPATH, "//button[@type='submit']")
button.click()
time.sleep(1)
driver.refresh()
print('Iteration ' + str(iteration) + ' completed')
iteration += 1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment