-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpwcheck.py
52 lines (47 loc) · 1.99 KB
/
pwcheck.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
from selenium import webdriver
from selenium.webdriver.common.by import By
from selenium.webdriver.common.keys import Keys
from selenium.webdriver.support.ui import WebDriverWait
from selenium.webdriver.support import expected_conditions as EC
from time import sleep
# This script loads the tezos pwcheck web page and
# Cycles through a list of passwords 'ourlist.txt'
# Each passwords should be on it's own line.
# It cycles through each possible password
# and outputs the resulting tz1 address
# copy the output or redirect to a file
# save as a text file and use the second script
# to test against check.tezos
# Requirements are selenium WebDriver, Firefox, Python3.
# I used Archlinux your results may vary.
with webdriver.Firefox() as driver:
# Online/Or Save Webpage Locally
# driver.get("https://tezos.com/static/pwcheck_full.html")
driver.get("file:///home/ryan/bigdata-home/recovery/pwcheck_full.html");
try:
elem = WebDriverWait(driver, 10).until(
EC.visibility_of_element_located((By.ID, "words"))
)
elem = driver.find_element_by_id("words")
# Set your passphrase here
elem.send_keys('setup east quarter cat cage ring lumber swear brown swear they mean garden cradle hour')
elem = driver.find_element_by_id("email")
# Set your email address here
elem.send_keys('[email protected]')
with open('ourlist.txt', 'r') as f:
for passwordList in f:
# Clear the TZ1 and Password Fields
elem = driver.find_element_by_id("tz1").clear()
elem = driver.find_element_by_id("password").clear()
# Get Next Password
elem = driver.find_element_by_id("password")
elem.send_keys(passwordList.rstrip())
# Sumbit the results
elem.submit()
# 1/4 second Delay
sleep(0.25);
# Get tz1 and output result
result = driver.find_element_by_id("tz1").get_attribute("value")
print(result,' ',passwordList.rstrip())
finally:
driver.quit()