-
Notifications
You must be signed in to change notification settings - Fork 29
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
52 additions
and
0 deletions.
There are no files selected for viewing
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
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") |
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
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") |