Post
Topic
Board Bitcoin Technical Support
Re: IMPORTING PRIVATE KEY
by
t3xoff
on 09/09/2021, 05:33:02 UTC
https://www.youtube.com/watch?v=ET_cMKPXuwk
He has created an automating tool to import mass keys to wallet without crashing but the download link is not working.

ANY OTHER IDEAS?

Would not surprise me if the file had a virus in it for unwitting people like yourself to come along and run it.

9/10 these things lead to you being infected with RAT (Remote Access Tool) or some hidden miner will run on your machine.

Unless the code is supplied on GitHub and can be verified stay away from solutions like this.

A simple python script can be used to import them to Electrum or Bitcoin Core.
DO NOT download random programs you find on YouTube.

Especially ones that have comments like this under them.

https://i.imgur.com/AyNMMc3.png


Here is some python code to batch import keys to Bitcoin Core..

it requires the Peter Todd implementation of Python BitcoinLib to work correctly.

https://github.com/petertodd/python-bitcoinlib

You also may want to limit how many you import in one go split your keys down into batches and import them
a batch at a time just to ensure your don't crash core while attempting the import.

5 Million keys is a lot but I doubt you will find anything with a random key import like this.

If your looking to "crack" a puzzle look at things like this Pollards Kangaroo or LBC projects around the forum.

One script is for IMPORT and one is for EXPORT

Good Luck!

Code:
#Import.py
#
from bitcoin.core import COIN
import bitcoin.rpc
bitcoin.SelectParams("mainnet")

proxy = bitcoin.rpc.Proxy()
with open("priv.txt")  as f:
    lines = f.readlines()

i = 1
for line in lines:
    addr = line.strip()
    #print (addr)
    print (i)
    print(proxy.call("importprivkey", addr,  "ImportWrongWalletAddr" + str(i),  False))


Code:
# Main.py
#
from bitcoin.core import COIN
import bitcoin.rpc
bitcoin.SelectParams("mainnet")

proxy = bitcoin.rpc.Proxy()
with open("walletlist.txt")  as f:
    lines = f.readlines()
    
for line in lines:
    tokens = line.split(";")
    addr = tokens[2].replace("\"", "")
    addr = addr.strip()
 #   print (addr)
    print(proxy.dumpprivkey(addr))

Thanks!