Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import sys
- from ecdsa import SigningKey, SECP256k1
- import sha3
- addresses = []
- with open('HEXminta.txt', 'r') as infile:
- for line in infile:
- hex_priv_key = line.strip()
- keccak = sha3.keccak_256()
- priv = SigningKey.from_string(string=bytes.fromhex(hex_priv_key), curve=SECP256k1)
- pub = priv.get_verifying_key().to_string()
- keccak.update(pub)
- address = keccak.hexdigest()[24:]
- addresses.append('0x'+ address)
- with open('addresses.txt', 'w') as outfile:
- for address in addresses:
- outfile.write(address + '\n')
Advertisement
Add Comment
Please, Sign In to add comment