0% found this document useful (0 votes)
4 views2 pages

Abb

Uploaded by

altcoinlx
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
4 views2 pages

Abb

Uploaded by

altcoinlx
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 2

06baea0d93F8038645f0fbee7D458

0xf11dB2134bcf2C8a68188Eb3831f864B81Ad208F
0xc47d4885E73794D85C227c80438d271dA04ab63A
0xFb52cb22d32752d13AD4BEA1267A035fEdAbbA75
0x6C5F1fb04bbbe10FC60c8A9A1591ecd0389117fA
0x95757443A03f97164a097dc1bC3CCc51040f3aA3
0xF084985Bf1733e3f3fC3ACFf187d2fB7e7868D61
0x17D6EeCD0EE447a02EAC9c1B2BC08a5D716C7076
0xD5CAA81290759506da72FFe4f2f0D8368e8fA1DB
0x525F8a35f121e905C8a1413086E0E1147598f6d0
0x4286a36eCE928074Eb7ff7aB1993B873fFBd073fCb18C5CdA66d236533E655BF5A104e7mn express
obscure inner rose guard
stairs panther purity ready also walnut motion drive awful apology breeze
ribbon rotate butter craft enemy apple pattern phone blur accuse pizza
piano swim end forward chunk three gentle birth ostrich donkey seed melt
Cài gói cần thiết:
pip install ecdsa
"""

import hashlib
import ecdsa

# Hàm chuyển private key thành địa chỉ BSC


def priv_to_bsc_address(priv_hex: str) -> str:
priv_hex = priv_hex.strip().lower().replace("0x","")
if len(priv_hex) != 64:
raise ValueError("Private key không hợp lệ: " + priv_hex)
priv_bytes = bytes.fromhex(priv_hex)

# Tạo public key (uncompressed)


sk = ecdsa.SigningKey.from_string(priv_bytes, curve=ecdsa.SECP256k1)
vk = sk.get_verifying_key()
pub_key = b'\x04' + vk.to_string()

# Keccak-256 (BSC/Ethereum)
keccak = hashlib.new('sha3_256')
keccak.update(pub_key[1:]) # bỏ byte đầu 0x04
address = keccak.digest()[-20:] # lấy 20 byte cuối
return "0x" + address.hex()

# ---- Chạy chính ----


input_file = "772035915-Eth-PrivateKeys.txt" # file private key
output_file = "bsc_addresses.txt"

with open(input_file, "r", encoding="utf-8", errors="ignore") as f:


lines = f.readlines()

results = []
for line in lines:
priv = line.strip()
if not priv:
continue
try:
addr = priv_to_bsc_address(priv)
results.append(f"{priv} -> {addr}")
except Exception as e:
results.append(f"{priv} -> LỖI: {e}")

try:
from bip_utils import Bip39SeedGenerator, Bip39MnemonicValidator, Bip44,
Bip44Coins, Bip44Changes
except ImportError:
print("Cài đặt bip-utils trước: pip install bip-utils")
return

if not args.input.exists():
print(f"Không tìm thấy file {args.input}")
return

# Regex nhận dạng mnemonic 12-24 từ


word = r"[a-z]+"
mnemonic_re = re.compile(rf"^({word}(?:\s+{word}){{11,23}})$")

raw_lines = args.input.read_text(encoding="utf-8",
errors="ignore").splitlines()

# Lọc ra mnemonic
candidates = []
for line in raw_lines:
line = line.strip()
if line and mnemonic_re.match(line):
candidates.append(line)
batch = 0
with ThreadPoolExecutor(max_workers=config.THREADS) as pool:
while batch < config.TOTAL_BATCHES:
if not seeds:
seeds = [sg.generate() for _ in range(config.SEED_BATCH_SIZE)]
futures = [pool.submit(worker, s, config, shared_cache, shared_stats)
for s in seeds]
results = [f.result() for f in futures]
found = [r for r in results if r]
if found:
with open(config.RESULT_FILE, "a", encoding="utf-8") as f:
f.write("\n".join(found) + "\n")
elapsed = time.time() - start_time
speed = shared_stats['seeds_scanned'] / elapsed if elapsed > 0 else 0
logging.info("="*60)
logging.info(f"Seeds scanned :
{shared_stats['seeds_scanned']}")
logging.info(f"Addresses checked :
{shared_stats['addresses_checked']}")
logging.info(f"Wallets with balance :
{shared_stats['wallets_found']}")
logging.info(f"Elapsed time : {elapsed:.2f} seconds")
logging.info(f"Speed : {speed:.2f} seeds/sec")
logging.info("="*60)
seeds = []
batch += 1

AddressCache(config.CACHE_FILE, config.MAX_CACHE_SIZE, secure).save()

if __name__ == "__main__":
asyncio.set_event_loop(loop)
main()

You might also like