\[BOUNTY CLAIMED\] Python conversion code for broken private keys
-
I’ll check this out when I get home - thanks!
-
So, here I created a test address with no coins on it with the official client:
[code]
dumpprivkey 6rnc5LW1zi1QDH2fRzZLCXPu2wEDX6mGkp
N8FF4eWtqD9ob6E2fNhKGKYgGfwVGje13nn1uLK8xuD5rvv2kZY1
[/code]Here’s the result:
[code]hank$ python convert.py --tobtc N8FF4eWtqD9ob6E2fNhKGKYgGfwVGje13nn1uLK8xuD5rvv2kZY1
9K5tGttcjM981HU9fdASvek4Wce6234LhUDcmirK6c7t44CWJhcL
hank$ python convert.py --toftc 9K5tGttcjM981HU9fdASvek4Wce6234LhUDcmirK6c7t44CWJhcL
9Knhubm3QF5Km7hMUfLUugUemr326gr35ze72qzkvW3vsvjhLDVt[/code][code]
importprivkey 9KnbfzhQxPz1CnDhRDPYqGsMto8YD9sJzeypfdnC6WWjR5iMdNc2
{“code”:-5,“message”:“Invalid private key”}
[/code]I also tried one of your FTC address outputs:
[code]
importprivkey 4MGS1y8YUYERWHgVDKfqv3NsvaBGVqGYEUiBAUmz9WA7hLJghzy9rB8FpQiF7XqEc3tLe6ZPyP4r14AYpVFqV
{“code”:-5,“message”:“Invalid private key”}
[/code] -
[quote name=“hank” post=“31001” timestamp=“1381556248”]
So, here I created a test address with no coins on it with the official client:
[code]
dumpprivkey 6rnc5LW1zi1QDH2fRzZLCXPu2wEDX6mGkp
N8FF4eWtqD9ob6E2fNhKGKYgGfwVGje13nn1uLK8xuD5rvv2kZY1
[/code]Here’s the result:
[code]hank$ python convert.py --tobtc N8FF4eWtqD9ob6E2fNhKGKYgGfwVGje13nn1uLK8xuD5rvv2kZY1
9K5tGttcjM981HU9fdASvek4Wce6234LhUDcmirK6c7t44CWJhcL
hank$ python convert.py --toftc 9K5tGttcjM981HU9fdASvek4Wce6234LhUDcmirK6c7t44CWJhcL
9Knhubm3QF5Km7hMUfLUugUemr326gr35ze72qzkvW3vsvjhLDVt[/code][code]
importprivkey 9KnbfzhQxPz1CnDhRDPYqGsMto8YD9sJzeypfdnC6WWjR5iMdNc2
{“code”:-5,“message”:“Invalid private key”}
[/code]I also tried one of your FTC address outputs:
[code]
importprivkey 4MGS1y8YUYERWHgVDKfqv3NsvaBGVqGYEUiBAUmz9WA7hLJghzy9rB8FpQiF7XqEc3tLe6ZPyP4r14AYpVFqV
{“code”:-5,“message”:“Invalid private key”}
[/code]
[/quote]Hmm… that’s strange. Let me look into that.
-
Fixed.
https://github.com/hank/life/blob/master/code/python/cryptcoin_addr_convert/convert.py
[code]hank$ python convert.py --tobtc N8FF4eWtqD9ob6E2fNhKGKYgGfwVGje13nn1uLK8xuD5rvv2kZY1
Converting N8FF4eWtqD9ob6E2fNhKGKYgGfwVGje13nn1uLK8xuD5rvv2kZY1
L48R4PUJP4Kswr3GvKAp7tDrnb8Masqpmc4C4yTp6Cf7vJ36t2t9
hank$ python convert.py --toftc N8FF4eWtqD9ob6E2fNhKGKYgGfwVGje13nn1uLK8xuD5rvv2kZY1
Converting N8FF4eWtqD9ob6E2fNhKGKYgGfwVGje13nn1uLK8xuD5rvv2kZY1
N8FF4eWtqD9ob6E2fNhKGKYgGfwVGje13nn1uLK8xuD5rvv2kZY1[/code]There were a couple things wrong. One was you had to encode the versions as ints and prepend them in binary instead of ascii. You were cutting too much off the end and the front (probably due to powershell insanity), which was a pretty easy fix. Try out verbose mode to see the full details.
As far as I can tell, this code works, so I think you’re still entitled to a bounty. I did have to fix it, so I don’t think the full 250 is fair - how does 150FTC sound?
-
Heh, I found the problem just now and was coming here to post the fix, but you had already found it.
I’ll take what I can get. Hope I helped ya… :)
-
You did help a lot - I’ll send the funds shortly.
-
[quote name=“hank” post=“31051” timestamp=“1381605534”]
You did help a lot - I’ll send the funds shortly.
[/quote]Sweet!
-
I’m trying to sync my wallet right now and I’m having some problems. Shouldn’t be too much longer though…
-
[b]Sent[/b]
[url=http://ftc.cryptocoinexplorer.com/tx/a225d549fff9f3a7617292ccef5aea5f3710fd5ae8d23f291154c4b90b21695c]http://ftc.cryptocoinexplorer.com/tx/a225d549fff9f3a7617292ccef5aea5f3710fd5ae8d23f291154c4b90b21695c[/url]
-
Great works guys :)