import requests
import time
import os
import subprocess
# Address to monitor
address = "13zb1hQbWVsc2S7ZTZnP2G4undNNpdh5so"
# File path to save the public key once detected
file_path = "C:\\Path\\To\\Your\\CrackingTool\\Folder\\puzzle.txt"
# Command to execute
cmd = "your_cracking_tool.exe -r 20000000000000000:3FFFFFFFFFFFFFFFF -o FOUND.txt -i puzzle.txt"
# API endpoint
api_url = f"https://blockchain.info/q/pubkeyaddr/{address}"
def monitor_address():
start_time = time.time()
while True:
try:
response = requests.get(api_url)
if response.status_code == 200:
print("OUTGOING TRANSACTION DETECTED!")
print("FETCHING COMPRESSED PUBLIC KEY...")
public_key = response.text
with open(file_path, 'w') as file:
file.write(public_key)
print("WRITING COMPRESSED PUBLIC KEY TO FILE...")
print("INITIALIZING...")
os.chdir("C:\\Path\\To\\Your\\CrackingTool\\Folder")
subprocess.call(["cmd.exe", "/c", cmd])
break
else:
os.system('cls' if os.name == 'nt' else 'clear')
elapsed_time = time.time() - start_time
print(f"Monitoring address: {address}...")
print(f"[T: {int(elapsed_time)}] No outgoing transaction yet...")
time.sleep(1)
except Exception as e:
print(f"Error: {e}")
time.sleep(1)
if __name__ == "__main__":
monitor_address()
This script monitors a given address waiting for an outgoing transaction to be broadcasted.
When this happens, the script will then write the public key to a file named "
puzzle.txt" and execute the cracking tool of choice using "
puzzle.txt" as the in file.
If someone wants to mess with it just replace
"File path to save the public key once detected" and
os.chdir("C:\\Path\\To\\Your\\CrackingTool\\Folder") with the actual paths
Also replace
"Address to monitor" with your target address and
"Command to execute" with the actual command to start up the algorithm of choice.
This script is fairly simple and as is it won't be able to compete with more elaborate bots, as it stops after finding the private key.
There's no automation to import the key into a wallet/transfer funds etc.
I made it just to test the response time using different tools.
BSGS-CUDA seems to be one of the best options for this, as it doesn't take too much time to load up.
I got to puzzle #70's private key in less than a minute with it.