Skip to content

Commit

Permalink
x
Browse files Browse the repository at this point in the history
  • Loading branch information
ELHARAKA committed Oct 6, 2024
1 parent 1a0b223 commit a55822b
Show file tree
Hide file tree
Showing 2 changed files with 52 additions and 0 deletions.
23 changes: 23 additions & 0 deletions pvkmassconvert_compressed.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
"""
Module for converting massive bitcoin private keys to WIF (Compressed).
"""

from src.conversion_utils import convert_hex_to_wif
from src.common import process_file

def convert(hex_private_key):
"""
Convert a hexadecimal private key to Wallet Import Format (WIF) for compressed addresses.
"""
wif = convert_hex_to_wif(hex_private_key, compressed=True)
with open('list-WIF-compressed.txt', 'a', encoding='utf-8') as file:
file.write(f"{wif}\n")

# Call common.py to process the file
process_file("brute-pvks.txt", convert)

print("Conversion successful. Check your 'list-WIF-compressed.txt' file for the converted keys.")
print("__________________________________________________")
print("Developed by: Fahd El Haraka")
print("If this saved you time or helped, donations please for BTC Address:")
print("bc1qttzkk555p78dyq9l8g7syza6n94ppysv66dps0")
29 changes: 29 additions & 0 deletions pvkwif2hex.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
"""
Module for converting multiple bitcoin private keys from WIF to HEX.
"""

from src import base58

def wif_to_hex(wif_key):
"""
Convert a WIF private key back to its hexadecimal representation.
"""
with open('list-hex.txt', 'a', encoding='utf-8') as file:
decoded = base58.b58decode(wif_key).hex()
hex_key = decoded[2:-10]
file.write(f"{hex_key}\n")

def process_file(file_path, conversion_function):
"""
Process a file with a specified conversion function.
"""
with open(file_path, encoding='utf-8') as file_handle:
for line in file_handle:
conversion_function(str.strip(line))

# Call common.py to process the file
process_file("wif.txt", wif_to_hex)

print("Conversion successful. Check your 'list-hex.txt' file for the converted keys.")
print("_________________________________")
print("Donations for BTC: bc1qttzkk555p78dyq9l8g7syza6n94ppysv66dps0")

0 comments on commit a55822b

Please sign in to comment.