gurnec / btcrecover

An open source Bitcoin wallet password and seed recovery tool designed for the case where you already know most of your password/seed, but need assistance in trying different possible combinations.
GNU General Public License v2.0
1.27k stars 681 forks source link

create-address-db.py #167

Open coinhunters opened 6 years ago

coinhunters commented 6 years ago

trying to create a database of bitcoin addresses, but i keep getting an error all the time, it appears someone else has already posted the error,

python create-address-db.py --force Parsing block files ... Traceback (most recent call last):#####################################################################################################-----------] 266,508,985 addrs. 1:08:53, ETA: 0:05:59 File "create-address-db.py", line 72, in addressset.create_address_db(args.dbfilename, blockdir, args.update, progress_bar=not args.no_progress) File "/home/djones/btcrecover-master/btcrecover/addressset.py", line 376, in create_address_db sigscript_len, offset = varint(block, offset + 36) # skips 32-byte tx id & 4-byte tx index File "/home/djones/btcrecover-master/btcrecover/addressset.py", line 279, in varint b = ord(data[offset]) IndexError: string index out of range

is there a fix for this?

coinhunters commented 6 years ago

is there no update for this, i'd really like to create a database of addresses, i think while my friend was creating the secondary password on the blockchain he may have pasted in a bitcoin address as his password, so this would be ideal to use

gurnec commented 6 years ago

This bug was fixed about 30 days ago in version 0.1.3. Please run create-address-db.py -v and if your version number is less than 0.1.3, please upgrade.

i'd really like to create a database of addresses, i think while my friend was creating the secondary password on the blockchain he may have pasted in a bitcoin address as his password, so this would be ideal to use

Even though it's called an "address database", it really isn't one... it's an approximate set membership or approximate membership query filter, similar to a cuckoo, Bloom, or quotient filter. Once it's built, there's no way to extract full addresses from it, it can only be used to test if a given address is (very likely) in it.

It's probably possible to make some quick-and-dirty changes to the code to get it to parse the blockchain and save full unique addresses to a text file, which sounds like what your trying to accomplish, but as it currently is, I don't think it would be helpful to you....

(Also, keep in mind that it only supports P2PKH addresses (those which start with a 1) and it can only fetch addresses which have received funds at least once.)

coinhunters commented 6 years ago

Starting btcrecover 0.17.9 on Python 2.7.14 64-bit, 21-bit unicodes, 64-bit ints create-address-db.py 0.1.3

thank you, running it again now

was able to successfully create the database this time, but when trying to use SQLite3 to read the database, it says its either encrypted or not a database

sqlite> .dbinfo database page size: 25971 write format: 115 read format: 32 reserved bytes: 100 file change counter: 1650553701 database page count: 218790695 freelist page count: 1751081593 schema cookie: 1952805671 schema format: 975189036 default cache size: 539457125 autovacuum top root: 1920166255 incremental vacuum: 1601074540 text encoding: 1848064544 user version: 824975399 application id: 1818190180 software version: 808475768 number of tables: 0 number of indexes: 0 number of triggers: 0 number of views: 0 schema size: 0 sqlite> .tables Error: file is encrypted or is not a database

i thought i'd be able to use this script to create a list of every bitcoin address, then use them to check if my friend copied and pasted a bitcoin wallet address as his password while he was trying to purchase an airline ticket with bitcoin, now its got a secondary password and he has no idea what it is, please advise if i am using this correctly or something went wrong,

cheers

gurnec commented 6 years ago

As I said...

Even though it's called an "address database", it really isn't one...

I just threw this script together from existing code in btcrecover (right-click, save link as...). If you place it into the same directory as btcrecover and run it, it should create a text file containing each P2PKH address that has received funds in the blockchain (excluding a few clearly invalid addresses). I barely tested it at all, so it's strictly "run at your own risk", but it seems to work for me. The output file will be somewhere around 10ish gig.

You can use this with btcrecover's --passwordlist (and --blockchain-secondpass) to see if the second password is a P2PKH (starts with a 1) address.

Good luck!

coinhunters commented 6 years ago

hi there,

thanks a lot for the script, but i have a feeling because the transaction wasn't completed with bitpay, the address would be one with a zero balance, so i guess i'm pretty much screwed if he infact used a bitcoin address as his second password on the blockchain, its unfortunate for him as he wont ever recover his money, i sold him my bitcoin miners and he had close to 2 bitcoins in there

coinhunters commented 4 years ago

what is the general costs to recover blockchain second password?

On Sat, Feb 1, 2020 at 8:50 AM nori19870522 notifications@github.com wrote:

I am Japanese and do password analysis. https://keychainx.io/

This is Robert's article.

https://news.bitstarz.com/bitstarz-news-interview-robert-rhodin-keychainx-ceo

I may be able to find the password you lost. Do you need help with your login?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/gurnec/btcrecover/issues/167?email_source=notifications&email_token=AIDP75PIJECQGYD77NC2Z5LRAR6H3A5CNFSM4EGHGJEKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEKPZTQQ#issuecomment-580884930, or unsubscribe https://github.com/notifications/unsubscribe-auth/AIDP75LRWA665V3X7E7EVBDRAR6H3ANCNFSM4EGHGJEA .

-- The BP Fixer

What we do is give you the ability to continue playing the game that we all love and hate so much, recently the repair glitch in the game has been fixed, we have a repair glitch that is still working today,

we can also log into your base and perform upgrades and refit any ships along with building new ships and performing upgrades in your retrofit lab, the service we are offering is pay a donation to us, we'll log into your base and while we're in your base, you will be logged into team speak and watching and advising on what upgrades you wish to have performed, for those that aren't computer savvy enough, we can log into your computer and install the repair glitch file for you so that you can play repair free

Any and all information contained in this communication or on our website is for general information purposes only. The information is provided by the owner and any and all that may contribute while we endeavor to keep the information up to date and correct, we make no representations or warranties of any kind, express or implied, about the completeness, accuracy, reliability, suitability or availability with respect to the website or the information, files products, services, or related graphics contained on the website for any purpose. Any reliance you place on such information is therefore strictly at YOUR OWN RISK.

In no event will we be liable for any loss or damage including without limitation, indirect or consequential loss or damage, or any loss or damage whatsoever arising from loss of data, profits,or accounts arising out of, or in connection with, the use of this website.

Through this website you my be able to link to other websites which are not under the control of the owner and any and all that may contribute.let it be know We have no control over the nature, content and availability of those sites. The inclusion of any links does not necessarily imply a recommendation or endorse the views expressed within them.

Every effort is made to keep the website up and running smoothly. However, the owner and any and all that may contribute takes no responsibility for, and will not be liable for, the website being temporarily unavailable due to technical issues beyond our control.

responsible use and desecration is the responsibility of the user not the the owner and any and all that may contribute