-
Notifications
You must be signed in to change notification settings - Fork 315
/
Convertor_Atomic.py
37 lines (32 loc) · 1.17 KB
/
Convertor_Atomic.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
from bit import Key
from lxml import html
import requests
def GetBal(addr):
URL_REQ = f"https://bitcoin.atomicwallet.io/address/{addr}"
RES_REQ = requests.get(URL_REQ)
Byte_STR = RES_REQ.content
SRC_CODE = html.fromstring(Byte_STR)
XPATCH = '/html/body/main/div/div[2]/div[1]/table/tbody/tr[3]/td[2]'
TREE_XP = SRC_CODE.xpath(XPATCH)
BAL_VALUE = str(TREE_XP[0].text_content())
return BAL_VALUE
found = 0
count = 0
# import all key from text file
filename = "PrivateKey_10M_Nov_2022.txt"
with open(filename, 'r', encoding='utf-8', errors='ignore') as fr:
for Prikvatekey in fr.readlines():
Privatekey = Prikvatekey.strip('\n').strip()
Private_Key = Key.from_hex(Privatekey)
# Create Address from Private Key
addr = Private_Key.address
balance = GetBal(addr)
count += 1
iffer = "0 BTC"
if balance != iffer:
found += 1
with open('FoundValue.txt', 'a') as vf:
vf.write(f"{addr} Balance: {balance}\n{Privatekey}\n{'=' * 55}\n")
vf.close()
else:
print(f"{count} Address: {addr} # Balance: {balance}\n{Privatekey}")