Created
March 28, 2024 16:18
-
-
Save Pymmdrza/4c3b6a0652115e99ecb9961b2bfa2b27 to your computer and use it in GitHub Desktop.
Recover Future Mode Random without repeat
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
import concurrent.futures | |
import random | |
import requests | |
from secp256k2 import Contactor | |
from colorthon import Colors as Fore | |
cont = Contactor() | |
def getTxs(addr: str) -> dict: | |
urlx = f"https://bitcoin.atomicwallet.io/api/v2/address/{addr}?page=1" | |
try: | |
req = requests.get(urlx) | |
if req.status_code == 200: | |
return req.json()["txs"] | |
except requests.RequestException as e: | |
print(f"Request failed for address {addr}: {e}") | |
return [] | |
def mainWork(): | |
z = 0 | |
ff = 0 | |
addrs = [] | |
while True: | |
for _ in range(8): | |
num = random.randint(1, 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF966666633321121) | |
caddr = cont.privatekey_to_address(0, True, num) | |
addrs.append(caddr) | |
uaddr = cont.privatekey_to_address(0, False, num) | |
addrs.append(uaddr) | |
with concurrent.futures.ThreadPoolExecutor(max_workers=100) as executor: | |
future_to_addr = {executor.submit(getTxs, addr): addr for addr in addrs} | |
for future in concurrent.futures.as_completed(future_to_addr): | |
addr = future_to_addr[future] | |
z += 1 | |
txs = future.result() | |
print( | |
f"[{Fore.GREEN}Done{Fore.RESET}] {Fore.BLUE}{z}{Fore.RESET} [FOUND:{Fore.GREEN}{ff}{Fore.RESET}] # {Fore.RED}{addr}{Fore.RESET} TXS:{Fore.CYAN}{txs}{Fore.RESET} # {Fore.GREY}{num}{Fore.RESET}") | |
if txs: | |
ff += 1 | |
with open("FoundRandom.txt", "a") as f: | |
f.write(f"{addr} TXS:{txs}\n") | |
addrs.clear() | |
if __name__ == "__main__": | |
mainWork() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment