Created
July 11, 2020 01:04
-
-
Save mauhcs/d07f3e71626e646f1609f471b0fb5fdd to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# pip install trezor | |
import subprocess | |
# wake up | |
get_ith_address(0) | |
def get_ith_address(i): | |
bashCommand = ["trezorctl", "eth", "get-address", "-n", "m/44'/60'/0'/0/"+f"{i}"] | |
process = subprocess.Popen(bashCommand, stdout=subprocess.PIPE) | |
output, error = process.communicate() | |
address = output.decode() | |
return address | |
address_zero = get_ith_address(0) | |
print(f"See logs with tail -f {address_zero}.log") | |
for i in range(0,100): | |
address = get_ith_address(i) | |
with open(f"{address_zero}.log", "a") as f: | |
f.write(f"{i},{address}") | |
print("Done...") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment