Bitcoin Forum
May 28, 2024, 09:04:28 PM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1] 2 »  All
  Print  
Author Topic: [HIRING] 1.5 BTC for wallet.dat inspection tool [Raised from 0.5 to 1 to 1.5BTC]  (Read 1984 times)
coiner8 (OP)
Member
**
Offline Offline

Activity: 65
Merit: 10


View Profile
April 27, 2014, 07:05:22 PM
Last edit: May 12, 2014, 06:36:42 PM by coiner8
 #1

Paying 0.5BTC 1BTC 1.5BTC for a tool that does this:

Code:
./wallet-tool [wallet filename]

--help                  Show this help
--is-encrypted          Outputs "Encrypted" or "Unencrypted" depending on the status of the wallet file
--passphrase=PASSPHRASE Specify passphrase for encrypted wallet
--test-passphrase       Simply tests the passphrase and outputs "Unencrypted", "Correct", or "Incorrect".  "Unencrypted" and "Correct" exit with 0, "Incorrect" exits with 1.
--determine-coin        Outputs the coin acronym and "otherversion" in the format "<coin acronym>,<otherversion>", e.g. "LTC,48"
--list-keys             List public and private keys in the format "<public>,<private>" one per line
--list-public-keys      List public keys one per line
--list-private-keys     List private keys one per line
--list-contacts         List addressbook contacts in the format "<address>,<label>" one per line
--balances              Lists balances for each key in the format "<public>,<balance>" one per line
--explorer-url          Outputs a direct URL to explore each public address in the format "<public>,<URL>" one per line

0.25BTC bonus for including:
Code:
--max-balance   Lists the maximum balance for each key in the format "<public>,<balance>,<timestamp>" one per line

Notes:
  • Must run on Linux.  Any other OS support is not important.
  • Must work with encrypted and unencrypted wallets.
  • If the wallet is encrypted and no passphrase or an incorrect passphrase is provided, output a warning as line 1 of stdout.  Continue to run the requested operation, outputting the encrypted private key anywhere the private key would normally be output.
  • If the wallet is encrypted and the correct passphrase is provided output a notice as line 1 of stdout
  • Must support the top 50 coins listed on coinmarketcap.com (sorted by market cap) (excluding coins like NXT that don't use wallet.dat and coins that don't have a functional block explorer)
  • Must work only with a wallet.dat file (no directory or blockchain), so you'll have to make calls to online block explorers
  • Must be able to easily add support for new coins, e.g. by adding a coin name, acronym, and root URL of block explorer to a config file
  • Feel free to use any open source code
  • Put the final code on Github under an open source license.  You're not required to maintain it, but can if you want to

Any questions ask in the thread.
E.exchanger
Hero Member
*****
Offline Offline

Activity: 714
Merit: 500


NEED CRYPTO CODER? COIN DEVELOPER? PM US FOR HELP!


View Profile
April 27, 2014, 10:04:57 PM
 #2

hey check you PM we can definitely have a deal on this one  Smiley
lyth0s
Legendary
*
Offline Offline

Activity: 1260
Merit: 1000


World Class Cryptonaire


View Profile
April 28, 2014, 03:07:50 AM
 #3

Hello Coiner8, if anyone develops this tool for you I will donate some btc to your cause, just message me via PM so I don't have to keep rechecking this post. I also appreciate you putting it as opensource on github.

Monero - Truly Anonymous Digital Cash. Bitcoin Reading List 2017
E.exchanger
Hero Member
*****
Offline Offline

Activity: 714
Merit: 500


NEED CRYPTO CODER? COIN DEVELOPER? PM US FOR HELP!


View Profile
April 28, 2014, 03:19:46 AM
 #4

Hello Coiner8, if anyone develops this tool for you I will donate some btc to your cause, just message me via PM so I don't have to keep rechecking this post. I also appreciate you putting it as opensource on github.

Maybe i can do this but i haven't heard from op lately i PM him though. !!!
lyth0s
Legendary
*
Offline Offline

Activity: 1260
Merit: 1000


World Class Cryptonaire


View Profile
April 28, 2014, 04:24:59 AM
 #5


I don't see the function listed where it can decrypt a wallet with a given password. Is there an option for that within that python script?

Monero - Truly Anonymous Digital Cash. Bitcoin Reading List 2017
cointra
Member
**
Offline Offline

Activity: 83
Merit: 10


View Profile WWW
April 28, 2014, 08:32:38 AM
 #6


I don't see the function listed where it can decrypt a wallet with a given password. Is there an option for that within that python script?

You can just use openssl decrypt the private keys (which is the only things encrypted in the wallet) it uses the AES-256-CBC.

pywallet works on wallets that are updated by some Bitcoin client, the OP wants a tool that works with only the wallet.dat file and not require presence of a local blockchain. The only for that is as the OP mentions by getting balance updates from block explorers. * on second look pywallet works with block explorer. The tough part is that they want the tool to be able to work with new coins by adding coinname/blockchain url in a config file, but that would work only if all block explorers use a common api which is sadly not the case.

coiner8 (OP)
Member
**
Offline Offline

Activity: 65
Merit: 10


View Profile
April 28, 2014, 02:27:12 PM
 #7

Pywallet might be a good place to start, but it doesn't handle most of the functions I want.  I use pywallet a lot and I end up having to do lots of operations manually (like figuring out which coin the wallet file is for, what the otherversion is, etc.).

@lyth0s.  I'll PM you too, but stating the amount you're willing to contribute here will be most helpful.

I'll raise my bounty to 1BTC (+0.25BTC bonus).  Does that work for you E.exchanger?  If you start off by putting it on Github there maybe be multiple people willing to chip in code & bounties.
coiner8 (OP)
Member
**
Offline Offline

Activity: 65
Merit: 10


View Profile
April 28, 2014, 02:35:54 PM
 #8

https://github.com/jackjack-jj/pywallet does this already.
* on second look pywallet works with block explorer. The tough part is that they want the tool to be able to work with new coins by adding coinname/blockchain url in a config file, but that would work only if all block explorers use a common api which is sadly not the case.

Not all block explorers use the same API, but there are certainly common ones.  ABE is one but I've noticed other ones that are used by many coins.  Also there are services that handle many coins like blockr.io and cryptocoinexplorer.com and those use the same API for each coin.   As long as the tool supports adding new coins for the major APIs/sites that is fine.
coiner8 (OP)
Member
**
Offline Offline

Activity: 65
Merit: 10


View Profile
May 12, 2014, 06:23:15 PM
 #9

Now raised the bounty to 1.5 BTC (+0.25 BTC bonus)!  That's pretty reasonable I think.  $660-$770 at current price of $440/BTC.  And it's a pretty fun project that will be widely used after you make it!

Any takers?  All the info you should need is in the OP.  Just get started, maybe put it up on Github during development and take my money!

Anyone else want to contribute to the bounty?  If so state the amount in the thread.
cointra
Member
**
Offline Offline

Activity: 83
Merit: 10


View Profile WWW
May 15, 2014, 06:14:54 PM
Last edit: May 15, 2014, 07:28:22 PM by cointra
 #10

Please check https://github.com/unicoinex/walletinfo

What works:

Everything except balance (just need to put regex for each explorer. Mostly trivial work left) Balances also added.

Only included top 10 coins for this initial release. New coins will be added gradually.

So essentially the app is complete and just needs the remaining coins addition

Please note that since its in python, for the sake of completeness, I have kept the coin details within the file.

coiner8 (OP)
Member
**
Offline Offline

Activity: 65
Merit: 10


View Profile
May 16, 2014, 04:42:32 AM
 #11

Please check https://github.com/unicoinex/walletinfo

What works:

Everything except balance (just need to put regex for each explorer. Mostly trivial work left) Balances also added.

Only included top 10 coins for this initial release. New coins will be added gradually.

So essentially the app is complete and just needs the remaining coins addition

Please note that since its in python, for the sake of completeness, I have kept the coin details within the file.

Thanks cointra!  I'll be able to check it out in detail in this weekend and will post any feedback here.
cointra
Member
**
Offline Offline

Activity: 83
Merit: 10


View Profile WWW
May 16, 2014, 07:58:16 AM
 #12

Added more coins bringing a total to 21 coins (from the top 50 market cap list excluding the ones that don't have a blockchain or blockchain explorer)

cointra
Member
**
Offline Offline

Activity: 83
Merit: 10


View Profile WWW
May 19, 2014, 04:27:44 AM
 #13

Please check https://github.com/unicoinex/walletinfo

What works:

Everything except balance (just need to put regex for each explorer. Mostly trivial work left) Balances also added.

Only included top 10 coins for this initial release. New coins will be added gradually.

So essentially the app is complete and just needs the remaining coins addition

Please note that since its in python, for the sake of completeness, I have kept the coin details within the file.

Thanks cointra!  I'll be able to check it out in detail in this weekend and will post any feedback here.

Hi coiner8, did you get the chance to check it out?

coiner8 (OP)
Member
**
Offline Offline

Activity: 65
Merit: 10


View Profile
May 19, 2014, 01:31:09 PM
 #14

Please check https://github.com/unicoinex/walletinfo

What works:

Everything except balance (just need to put regex for each explorer. Mostly trivial work left) Balances also added.

Only included top 10 coins for this initial release. New coins will be added gradually.

So essentially the app is complete and just needs the remaining coins addition

Please note that since its in python, for the sake of completeness, I have kept the coin details within the file.

Thanks cointra!  I'll be able to check it out in detail in this weekend and will post any feedback here.

Hi coiner8, did you get the chance to check it out?

Hi cointra,

I can't test it easily or fully because it uses pywallet's strange and broken --datadir.  The script needs to be able to work by providing just the path to a wallet file, no --datadir option.  Also pywallet's implementation only opens files named "wallet.dat", even if you specify a different file.  The script should be able to handle a wallet with any filename.  If it requires a working directory it should handle that internally.

  • --list-keys: The format of the public and private keys should be the "usual" format.  For the public key, that is the format shown in the client and block explorers (i.e. 1GoK6fv4tZKXFiWL9NuHiwcwsi8JAFiwGK).  For the private key, it should be the format used by the client's "dumpprivkey" and "importprivkey" commands.  For long term planning perhaps adding a --format option where the default is the "usual" format would be a good way to go.
  • --list-keys: When I do --list-keys (or pretty much any other command) the script needs to output the warning/notice about the encryption status as the first line of stdout.  See the OP for details.
  • --is-encrypted: This is outputting "Encrypted" even for wallets I'm sure are unencrypted.  I haven't been able to get it to say "Unencrypted" yet.
  • --is-encrypted: When I ran this on a newly created encrypted Blackcoin wallet I got this error:
Code:
Traceback (most recent call last):
  File "wi.py", line 1685, in parse_wallet
    item_callback(type, d)
  File "wi.py", line 1323, in item_callback
    if passphrase:
NameError: global name 'passphrase' is not defined
ERROR parsing wallet.dat, type mkey
key data: mkey
key data in hex: 046d6b657901000000
value data in hex: 3086c443a92ac09f438ff7d70d9caea2d35bf0de063cf8b8e948540c95e3196f39a5a02201eb0db22e03d20f93977f00f108ac026eb2a53908a200000000a861000000
    [/li]
  • --test-passphrase: Same error as above.
  • --list-contacts: The labels should be in double quotes.  If there is no label for an address, output "".
  • --balances: I tested with a Zetacoin wallet and it gave an error for each address: "Error reading balance for address".  The URL in the script returns a 404 when I visit it in my browser.
  • --explore-url: Should be named --explorer-url.  Also it output "None" as the last line.  Not sure why that was, but each line should either be a URL or an error message.

This list of issues doesn't represent a full thorough test.  The inconvenience of the --datadir/wallet.dat filename issue was enough that I only tried a few different wallet files.  Once that issue is fixed I'll do a more complete test of all features with more wallets.

And despite the list of issues, I do think the tool is coming along well.  It seems like it has the core routines it needs, it just needs to be polished for user friendliness.
cointra
Member
**
Offline Offline

Activity: 83
Merit: 10


View Profile WWW
May 19, 2014, 03:28:17 PM
 #15

Please check https://github.com/unicoinex/walletinfo

What works:

Everything except balance (just need to put regex for each explorer. Mostly trivial work left) Balances also added.

Only included top 10 coins for this initial release. New coins will be added gradually.

So essentially the app is complete and just needs the remaining coins addition

Please note that since its in python, for the sake of completeness, I have kept the coin details within the file.

Thanks cointra!  I'll be able to check it out in detail in this weekend and will post any feedback here.

Hi coiner8, did you get the chance to check it out?

Hi cointra,

I can't test it easily or fully because it uses pywallet's strange and broken --datadir.  The script needs to be able to work by providing just the path to a wallet file, no --datadir option.  Also pywallet's implementation only opens files named "wallet.dat", even if you specify a different file.  The script should be able to handle a wallet with any filename.  If it requires a working directory it should handle that internally.

  • --list-keys: The format of the public and private keys should be the "usual" format.  For the public key, that is the format shown in the client and block explorers (i.e. 1GoK6fv4tZKXFiWL9NuHiwcwsi8JAFiwGK).  For the private key, it should be the format used by the client's "dumpprivkey" and "importprivkey" commands.  For long term planning perhaps adding a --format option where the default is the "usual" format would be a good way to go.
  • --list-keys: When I do --list-keys (or pretty much any other command) the script needs to output the warning/notice about the encryption status as the first line of stdout.  See the OP for details.
  • --is-encrypted: This is outputting "Encrypted" even for wallets I'm sure are unencrypted.  I haven't been able to get it to say "Unencrypted" yet.
  • --is-encrypted: When I ran this on a newly created encrypted Blackcoin wallet I got this error:
Code:
Traceback (most recent call last):
  File "wi.py", line 1685, in parse_wallet
    item_callback(type, d)
  File "wi.py", line 1323, in item_callback
    if passphrase:
NameError: global name 'passphrase' is not defined
ERROR parsing wallet.dat, type mkey
key data: mkey
key data in hex: 046d6b657901000000
value data in hex: 3086c443a92ac09f438ff7d70d9caea2d35bf0de063cf8b8e948540c95e3196f39a5a02201eb0db22e03d20f93977f00f108ac026eb2a53908a200000000a861000000
    [/li]
    [li]--test-passphrase: Same error as above.[/li]
  • --list-contacts: The labels should be in double quotes.  If there is no label for an address, output "".
  • --balances: I tested with a Zetacoin wallet and it gave an error for each address: "Error reading balance for address".  The URL in the script returns a 404 when I visit it in my browser.
  • --explore-url: Should be named --explorer-url.  Also it output "None" as the last line.  Not sure why that was, but each line should either be a URL or an error message.

This list of issues doesn't represent a full thorough test.  The inconvenience of the --datadir/wallet.dat filename issue was enough that I only tried a few different wallet files.  Once that issue is fixed I'll do a more complete test of all features with more wallets.

And despite the list of issues, I do think the tool is coming along well.  It seems like it has the core routines it needs, it just needs to be polished for user friendliness.

Resolved most of your reported issues:
- is-encrypted now works
- datadir is removed (use --wallet and pass wallet path, works with any name)
- Zetacoin is an issue with zetachain.cc but I don't blame them they clearly mention that they're in beta. Will see if I can find any other zetacoin explorer
- list-contacts now show labels in double quotes

Some things still left, I will commit the whole later today once they are all done.

cointra
Member
**
Offline Offline

Activity: 83
Merit: 10


View Profile WWW
May 19, 2014, 04:06:51 PM
 #16

Committed with all the fixes. Passphrase decryption is not working and gives segmentation fault, found the problem statement will be fixing it soon. In the meantime if you can check if all your previously mentioned issues have been resolved. Also note I have put a different blockchain explorer for zetacoin so balance should work now.

cointra
Member
**
Offline Offline

Activity: 83
Merit: 10


View Profile WWW
May 19, 2014, 04:41:42 PM
 #17

Fixed the passphrase segfault. Make sure you install pycryto python module or else decryption will be dead slow. Everything should work as expected now.

coiner8 (OP)
Member
**
Offline Offline

Activity: 65
Merit: 10


View Profile
May 20, 2014, 01:09:15 PM
 #18

Fixed the passphrase segfault. Make sure you install pycryto python module or else decryption will be dead slow. Everything should work as expected now.

Great.  I might not have time to test for a while, so please send me your BTC address and I'll send 0.75 BTC now and the rest after I test.

In the one test I did I got an error message:

Code:
$ python wi.py --is-encrypted --wallet=/home/user/wallet1.dat
Traceback (most recent call last):
  File "wi.py", line 1823, in <module>
    db_env = create_env(db_dir)
  File "wi.py", line 1158, in create_env
    (DB_CREATE | DB_INIT_LOCK | DB_INIT_LOG | DB_INIT_MPOOL | DB_INIT_TXN | DB_THREAD | DB_RECOVER))
bsddb.db.DBInvalidArgError: (22, 'Invalid argument -- mmap: Invalid argument')

Tried it with a couple wallet files and got the same error.  The user has read/write permission to the directory.  I have the python-crypto package installed.
cointra
Member
**
Offline Offline

Activity: 83
Merit: 10


View Profile WWW
May 20, 2014, 02:37:05 PM
 #19

Fixed the passphrase segfault. Make sure you install pycryto python module or else decryption will be dead slow. Everything should work as expected now.

Great.  I might not have time to test for a while, so please send me your BTC address and I'll send 0.75 BTC now and the rest after I test.

In the one test I did I got an error message:

Code:
$ python wi.py --is-encrypted --wallet=/home/user/wallet1.dat
Traceback (most recent call last):
  File "wi.py", line 1823, in <module>
    db_env = create_env(db_dir)
  File "wi.py", line 1158, in create_env
    (DB_CREATE | DB_INIT_LOCK | DB_INIT_LOG | DB_INIT_MPOOL | DB_INIT_TXN | DB_THREAD | DB_RECOVER))
bsddb.db.DBInvalidArgError: (22, 'Invalid argument -- mmap: Invalid argument')

Tried it with a couple wallet files and got the same error.  The user has read/write permission to the directory.  I have the python-crypto package installed.

Could it be the bsddb module version you have? I tried the exact same command and got no error. I will just post a set up guide to make sure we're installing the correct python/module versions.

Actually just did a quick search, it could be python version issue as mentioned http://stackoverflow.com/questions/15958917/bsddb-4-2-52-dbinvalidargerror-22-invalid-argument

Can you try with python 2.7? If not I will downgrade to python 2.5

coiner8 (OP)
Member
**
Offline Offline

Activity: 65
Merit: 10


View Profile
May 23, 2014, 02:59:04 AM
 #20

Fixed the passphrase segfault. Make sure you install pycryto python module or else decryption will be dead slow. Everything should work as expected now.

Great.  I might not have time to test for a while, so please send me your BTC address and I'll send 0.75 BTC now and the rest after I test.

In the one test I did I got an error message:

Code:
$ python wi.py --is-encrypted --wallet=/home/user/wallet1.dat
Traceback (most recent call last):
  File "wi.py", line 1823, in <module>
    db_env = create_env(db_dir)
  File "wi.py", line 1158, in create_env
    (DB_CREATE | DB_INIT_LOCK | DB_INIT_LOG | DB_INIT_MPOOL | DB_INIT_TXN | DB_THREAD | DB_RECOVER))
bsddb.db.DBInvalidArgError: (22, 'Invalid argument -- mmap: Invalid argument')

Tried it with a couple wallet files and got the same error.  The user has read/write permission to the directory.  I have the python-crypto package installed.

Could it be the bsddb module version you have? I tried the exact same command and got no error. I will just post a set up guide to make sure we're installing the correct python/module versions.

Actually just did a quick search, it could be python version issue as mentioned http://stackoverflow.com/questions/15958917/bsddb-4-2-52-dbinvalidargerror-22-invalid-argument

Can you try with python 2.7? If not I will downgrade to python 2.5

Actually, I figured out what is causing the problem.  I'm using VirtualBox and the wallet files are on a shared drive, and for some reason BSDDB can't work with that directory.  All other tools I've used can read/write fine to it, they treat it just like any other directory.  My suggested fix will actually fix two issues:

- Suggested fix: Create a temporary working directory in /tmp, do the operation, remove the directory.

This addresses the issue with the shared drive and also fixes the issue that currently lots of __db.00X files are left behind in the directory after the script finishes.  If you can do the operation using the temporary directory and leaving the wallet file in its current place, that is best.  If you need to have the wallet file in the temporary directory, then copying it over would be ok.

And please send me your Bitcoin address so I can send you half now.  I've been slow to test but I want to make sure you know I'm good for the BTC and to keep you motivated to make these fixes.
Pages: [1] 2 »  All
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!