Guest User

Untitled

a guest
Feb 5th, 2022
91
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.53 KB | None | 0 0
  1. import sys
  2. from ecdsa import SigningKey, SECP256k1
  3. import sha3
  4.  
  5. addresses = []
  6. with open('HEXminta.txt', 'r') as infile:
  7. for line in infile:
  8. hex_priv_key = line.strip()
  9. keccak = sha3.keccak_256()
  10. priv = SigningKey.from_string(string=bytes.fromhex(hex_priv_key), curve=SECP256k1)
  11. pub = priv.get_verifying_key().to_string()
  12. keccak.update(pub)
  13. address = keccak.hexdigest()[24:]
  14. addresses.append('0x'+ address)
  15.  
  16. with open('addresses.txt', 'w') as outfile:
  17. for address in addresses:
  18. outfile.write(address + '\n')
Advertisement
Add Comment
Please, Sign In to add comment