Bitcoin Forum
April 25, 2024, 08:56:55 AM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: « 1 2 3 4 5 [6]  All
  Print  
Author Topic: .05BTC (~$1,700) to whoever helps me successfully extract my BTC from CLI wallet  (Read 1802 times)
21XO (OP)
Jr. Member
*
Offline Offline

Activity: 57
Merit: 29


View Profile
February 04, 2021, 11:56:53 PM
 #101

Omg I think it worked...

Code:
parallels@parallels-Parallels-Virtual-Platform:~/Desktop$ python2 dirty.py wallet.json wallet2.json
Blockstack Legacy wallet crack
-----

Opening wallet file wallet.json...
Deriving master private key...

Wallet created. Make sure to backup the following:

-----
master_private_key: xxx
wallet_password: xxx
-----

-----
encrypted_master_private_key: xxx
-----
owner_addresses: ['146qagi4RScaREcgvxyzXuc8JBJ6T48e5J']
owner_key_hex: xxx
WIF owner: xxx
-----
payment_addresses: ['194zW3CDXCuhx24quQcDaJBKwmonxxkK7N']
payment_key_hex xxx
WIF payment: xxx
-----
payment_addresses: ['179s8CGfRVwjoLtNbd9a4HMoTYon4vsoyv']
payment_key_hex xxx
WIF payment: xxx
-----

FROM MASTER
Address: 1MCU3cw8bSnaoaCTywx5HgHkL8Vn3dzkd6
Priv HEX: xxx
WIF Master: xxx
parallels@parallels-Parallels-Virtual-Platform:~/Desktop$


What do I need to import into Electrum? The WIF master?
1714035415
Hero Member
*
Offline Offline

Posts: 1714035415

View Profile Personal Message (Offline)

Ignore
1714035415
Reply with quote  #2

1714035415
Report to moderator
1714035415
Hero Member
*
Offline Offline

Posts: 1714035415

View Profile Personal Message (Offline)

Ignore
1714035415
Reply with quote  #2

1714035415
Report to moderator
There are several different types of Bitcoin clients. The most secure are full nodes like Bitcoin Core, but full nodes are more resource-heavy, and they must do a lengthy initial syncing process. As a result, lightweight clients with somewhat less security are commonly used.
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
1714035415
Hero Member
*
Offline Offline

Posts: 1714035415

View Profile Personal Message (Offline)

Ignore
1714035415
Reply with quote  #2

1714035415
Report to moderator
1714035415
Hero Member
*
Offline Offline

Posts: 1714035415

View Profile Personal Message (Offline)

Ignore
1714035415
Reply with quote  #2

1714035415
Report to moderator
1714035415
Hero Member
*
Offline Offline

Posts: 1714035415

View Profile Personal Message (Offline)

Ignore
1714035415
Reply with quote  #2

1714035415
Report to moderator
escobol
Member
**
Offline Offline

Activity: 154
Merit: 39


View Profile
February 04, 2021, 11:57:34 PM
Merited by LoyceV (4), ABCbits (2)
 #102

payment_addresses: ['194zW3CDXCuhx24quQcDaJBKwmonxxkK7N']
payment_key_hex xxx
WIF payment: xxx

Omg I think it worked...

Code:
parallels@parallels-Parallels-Virtual-Platform:~/Desktop$ python2 dirty.py wallet.json wallet2.json
Blockstack Legacy wallet crack
-----

Opening wallet file wallet.json...
Deriving master private key...

Wallet created. Make sure to backup the following:

-----
master_private_key: xxx
wallet_password: xxx
-----

-----
encrypted_master_private_key: xxx
-----
owner_addresses: ['146qagi4RScaREcgvxyzXuc8JBJ6T48e5J']
owner_key_hex: xxx
WIF owner: xxx
-----
payment_addresses: ['194zW3CDXCuhx24quQcDaJBKwmonxxkK7N']
payment_key_hex xxx
WIF payment: xxx
-----
payment_addresses: ['179s8CGfRVwjoLtNbd9a4HMoTYon4vsoyv']
payment_key_hex xxx
WIF payment: xxx
-----

FROM MASTER
Address: 1MCU3cw8bSnaoaCTywx5HgHkL8Vn3dzkd6
Priv HEX: xxx
WIF Master: xxx
parallels@parallels-Parallels-Virtual-Platform:~/Desktop$


What do I need to import into Electrum? The WIF master?
21XO (OP)
Jr. Member
*
Offline Offline

Activity: 57
Merit: 29


View Profile
February 05, 2021, 12:17:24 AM
Merited by NotATether (5), LoyceV (4), bitmover (3), ABCbits (2), Halab (2), TheBeardedBaby (1), PawGo (1)
 #103

VICTORY!!!!!!!!! Thank you all so much!!!


One last thing: all the forks (e.g. bitcoin cash) is also connected with my BTC...so when I send out BTC to anther wallet, will it also send out BCH?



And I will split the bounty with escobol and NotATether but let me know if anyone feels I should also send them some extra BTC for their help.






So grateful to all you guys.
NotATether
Legendary
*
Online Online

Activity: 1582
Merit: 6680


bitcoincleanup.com / bitmixlist.org


View Profile WWW
February 05, 2021, 04:06:23 AM
 #104

VICTORY!!!!!!!!! Thank you all so much!!!

Awesome, glad that it worked out for you. We almost got stumped at the part to extract the private keys but escobol gave us the final push!

One last thing: all the forks (e.g. bitcoin cash) is also connected with my BTC...so when I send out BTC to anther wallet, will it also send out BCH?

Sending the BTC to some other address will only send that BTC by itself and no forks. You should follow LoyceV's fork claiming guide to claim your BCH and BSV.

And I will split the bounty with escobol and NotATether but let me know if anyone feels I should also send them some extra BTC for their help.

I personally feel that you should also share it with PawGo, he has corrected several steps in my process without which you wouldn't have blockstack installed in the first place. Just my two sats.

P.S. I'm also planning to fork the blockstack client legacy code and add those two commands to import a wallet and extract the private keys for anyone else trying to get their coins out of blockstack.

.
.BLACKJACK ♠ FUN.
█████████
██████████████
████████████
█████████████████
████████████████▄▄
░█████████████▀░▀▀
██████████████████
░██████████████
████████████████
░██████████████
████████████
███████████████░██
██████████
CRYPTO CASINO &
SPORTS BETTING
▄▄███████▄▄
▄███████████████▄
███████████████████
█████████████████████
███████████████████████
█████████████████████████
█████████████████████████
█████████████████████████
███████████████████████
█████████████████████
███████████████████
▀███████████████▀
█████████
.
21XO (OP)
Jr. Member
*
Offline Offline

Activity: 57
Merit: 29


View Profile
February 05, 2021, 04:18:12 AM
Merited by TheBeardedBaby (1), PawGo (1)
 #105

Sorry PawGo, didn't mean to leave you out.

Okay I will send .033 to NotATether, .033 to escobol, and .033 to PawGo. I will keep .9 Smiley


Please PM me your addresses!
NotATether
Legendary
*
Online Online

Activity: 1582
Merit: 6680


bitcoincleanup.com / bitmixlist.org


View Profile WWW
February 05, 2021, 05:33:04 AM
 #106

Sorry PawGo, didn't mean to leave you out.

Okay I will send .033 to NotATether, .033 to escobol, and .033 to PawGo. I will keep .9 Smiley


Please PM me your addresses!

One last thing, which of the three private keys were your bitcoins in? Owner, payment, or that master key?

.
.BLACKJACK ♠ FUN.
█████████
██████████████
████████████
█████████████████
████████████████▄▄
░█████████████▀░▀▀
██████████████████
░██████████████
████████████████
░██████████████
████████████
███████████████░██
██████████
CRYPTO CASINO &
SPORTS BETTING
▄▄███████▄▄
▄███████████████▄
███████████████████
█████████████████████
███████████████████████
█████████████████████████
█████████████████████████
█████████████████████████
███████████████████████
█████████████████████
███████████████████
▀███████████████▀
█████████
.
21XO (OP)
Jr. Member
*
Offline Offline

Activity: 57
Merit: 29


View Profile
February 05, 2021, 05:46:16 AM
 #107

Sorry PawGo, didn't mean to leave you out.

Okay I will send .033 to NotATether, .033 to escobol, and .033 to PawGo. I will keep .9 Smiley


Please PM me your addresses!

One last thing, which of the three private keys were your bitcoins in? Owner, payment, or that master key?

Payment
PawGo
Legendary
*
Offline Offline

Activity: 952
Merit: 1367


View Profile
February 05, 2021, 06:57:09 AM
 #108


One last thing: all the forks (e.g. bitcoin cash) is also connected with my BTC...so when I send out BTC to anther wallet, will it also send out BCH?


Congratulations!

Remember that now you have a lot of forks... You may check here: http://www.findmycoins.ninja/
Only BCH has some sensible value, but if you want to play, now you may collect many of them. Just be careful with software you install (maybe do it on virtual machine) and do it after you empty BTC.

LoyceV
Legendary
*
Online Online

Activity: 3290
Merit: 16547


Thick-Skinned Gang Leader and Golden Feather 2021


View Profile WWW
February 05, 2021, 08:51:23 AM
 #109

Nice to see this resolved! I've added this topic to my [overview] Recover Bitcoin from any old storage format.

I was able to download Blockstack .18 on Ubuntu thanks to the instructions PawGo gave my via DM (thanks PawGo).
@PawGo: can you post your instructions here for future reference?

Okay I will send .033 to NotATether, .033 to escobol, and .033 to PawGo. I will keep .9 Smiley
It's great to see you keep your promise!

@NotATether, @escobol @PawGo: I want to Merit the right posts, but I don't really want to analyze all posts in details. Can you tell me which of your posts lead to the solution, so I can easily lazily Merit them?

Remember that now you have a lot of forks... You may check here: http://www.findmycoins.ninja/
Only BCH has some sensible value, but if you want to play, now you may collect many of them. Just be careful with software you install (maybe do it on virtual machine) and do it after you empty BTC.
If there was 1 Bitcoin in the address, you're looking at appromately these amounts:
BCH: $400
BSV: $165
BCH-A: $15
BTG: $8
BCD: $5
Some of the others have some value too, but I haven't figured out yet how to claim them.
Don't forget there's no replay protection between the first 3. If you want, I can send you some BCH dust so you can move it without moving your BSV/BCH-A.

█▀▀▀











█▄▄▄
▀▀▀▀▀▀▀▀▀▀▀
e
▄▄▄▄▄▄▄▄▄▄▄
█████████████
████████████▄███
██▐███████▄█████▀
█████████▄████▀
███▐████▄███▀
████▐██████▀
█████▀█████
███████████▄
████████████▄
██▄█████▀█████▄
▄█████████▀█████▀
███████████▀██▀
████▀█████████
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
c.h.
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
▀▀▀█











▄▄▄█
▄██████▄▄▄
█████████████▄▄
███████████████
███████████████
███████████████
███████████████
███░░█████████
███▌▐█████████
█████████████
███████████▀
██████████▀
████████▀
▀██▀▀
escobol
Member
**
Offline Offline

Activity: 154
Merit: 39


View Profile
February 05, 2021, 09:53:29 AM
Merited by bitmover (3)
 #110

Started with #80
LAter #102 and #103

Nice to see this resolved! I've added this topic to my [overview] Recover Bitcoin from any old storage format.

I was able to download Blockstack .18 on Ubuntu thanks to the instructions PawGo gave my via DM (thanks PawGo).
@PawGo: can you post your instructions here for future reference?

Okay I will send .033 to NotATether, .033 to escobol, and .033 to PawGo. I will keep .9 Smiley
It's great to see you keep your promise!

@NotATether, @escobol @PawGo: I want to Merit the right posts, but I don't really want to analyze all posts in details. Can you tell me which of your posts lead to the solution, so I can easily lazily Merit them?

Remember that now you have a lot of forks... You may check here: http://www.findmycoins.ninja/
Only BCH has some sensible value, but if you want to play, now you may collect many of them. Just be careful with software you install (maybe do it on virtual machine) and do it after you empty BTC.
If there was 1 Bitcoin in the address, you're looking at appromately these amounts:
BCH: $400
BSV: $165
BCH-A: $15
BTG: $8
BCD: $5
Some of the others have some value too, but I haven't figured out yet how to claim them.
Don't forget there's no replay protection between the first 3. If you want, I can send you some BCH dust so you can move it without moving your BSV/BCH-A.

escobol
Member
**
Offline Offline

Activity: 154
Merit: 39


View Profile
February 05, 2021, 09:56:12 AM
 #111

@NotATether
[child[0]]

Sorry PawGo, didn't mean to leave you out.

Okay I will send .033 to NotATether, .033 to escobol, and .033 to PawGo. I will keep .9 Smiley


Please PM me your addresses!

One last thing, which of the three private keys were your bitcoins in? Owner, payment, or that master key?

Payment
PawGo
Legendary
*
Offline Offline

Activity: 952
Merit: 1367


View Profile
February 05, 2021, 01:33:27 PM
Merited by LoyceV (9), ABCbits (7), bitmover (3), TheBeardedBaby (1)
 #112

I was able to download Blockstack .18 on Ubuntu thanks to the instructions PawGo gave my via DM (thanks PawGo).
@PawGo: can you post your instructions here for future reference?

I used cygwin on Windows (https://www.cygwin.com/) but if you have Ubuntu, the actions should be this same. For me it was easier to emulate linux using cygwin, that's why I tried.
So, download the installation package and launch. It will connect to server and try to download needed packaged. You may select packages you want - or first install empty cygwin and then launch installation again just to add missing packages.
I send you the list of all packages I have - as I wrote before you will need python2-devel and libssl-devel packages. And python2.7 of course. The rest normally comes with the installation. Maybe I am missing something - I had this environment configured before - but I think it will be easy to find which package is required.
https://ibb.co/dPJ3sQz
https://ibb.co/b3mF0Ww
https://ibb.co/xjqxrQ7

then you receive access to console.
I have launched
Code:
curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py
Code:
python2.7 get-pip.py
Code:
python2.7 -m pip install --upgrade pip
Code:
python2.7 -m pip install onedrivesdk==1.1.8
Code:
python2.7 -m pip install blockstack==0.18.0.10

and now blockstack is installed

Code:
$ blockstack --version
/usr/lib/python2.7/site-packages/virtualchain/lib/ecdsalib.py:26: CryptographyDeprecationWarning: Python 2 is no longer supported by the Python core team. Support for it is now deprecated in cryptography, and will be removed in the next release.
  from cryptography.hazmat.backends import default_backend
0.18.0.10

--------

@NotATether: you may mark this post, and maybe also one of (already merited by ETFbitcoin):
https://bitcointalk.org/index.php?topic=5306458.msg56010431#msg56010431
https://bitcointalk.org/index.php?topic=5306458.msg56011477#msg56011477
https://bitcointalk.org/index.php?topic=5306458.msg56017358#msg56017358
My other posts you merited already Wink

NotATether
Legendary
*
Online Online

Activity: 1582
Merit: 6680


bitcoincleanup.com / bitmixlist.org


View Profile WWW
February 05, 2021, 03:59:04 PM
Merited by LoyceV (4), bitmover (3)
 #113

@NotATether, @escobol @PawGo: I want to Merit the right posts, but I don't really want to analyze all posts in details. Can you tell me which of your posts lead to the solution, so I can easily lazily Merit them?

I can but it's going to be in the form of quotes and not direct links, I think that'll be more useful. Long post warning


Any update?
Did OP open the wallet and forgot about his promise?


I was able to download Blockstack .18 on Ubuntu thanks to the instructions PawGo gave my via DM (thanks PawGo).

The wallet has 3 keys (data, payment, owner). But I only have a "master key". So I'm not sure if I need to download an even earlier version of Blockstack or if I need to extract the payment key from the master key somehow in version .18.

I emailed Blockstack support but they still haven't responded.


If I install an earlier version of Blockstack, I need to delete Blockstack .18 first right?

So, it looks like Blockstack has it's own private key format that is 64 to 66 characters long. Apparently, even the address types in Blockstack are different from bitcoin addresses but can be converted to and from them.

You should try using blockstack-client (it is a python binding of blockstack https://pypi.org/project/blockstack-client/, it's the one that makes a json file like the one you showed, when a wallet is created and pesters the user to export it to a file). It needs Python 2 to work.

1. Install Python 2
Code:
sudo apt install -y python2

2. Install pip for python 2 (yes we run this as root user)
Code:
sudo curl https://bootstrap.pypa.io/get-pip.py --output get-pip.py
sudo python2 get-pip.py

2. Install blockstsck-client
Code:
pip2 install blockstack-client virtualchain==0.14.0

3. Save this wallet JSON you posted to a file, like wallet.json for example.
Code:
{
"master_private_key": "ef242kfjj24ekf3223jesdkhefsfhk324wuefhw38fhrypofhtr34d342132d34jsd49",
"wallet_password": “kljsef9832nkfssf”
}

4. Run
Code:
blockstack set_advanced_mode
and type "on" to access the inport_wallet command.

5. Run
Code:
blockstack import_wallet wallet.json
, it will import your wallet from wallet.json and display your addresses.

6. To get the private keys run
Code:
blockstack wallet

It will show you output like this:

Code:
Enter wallet password: PUT THE wallet_password HERE, IT IS NOT ENCRYPTED
------------------------------------------------------------
Payment address:        1HxJ767HSYyvPzHKBVP1JUHfefNzg53Hp6
Owner address:          1PcCxR81Y5BrrD4FnwoWuJ8tH7kURTe1nv
Data public key:        035d999986a0de6e61a20dfa2b92b22daf451303e7b34a4b34103c33d712cfc1fd
------------------------------------------------------------
Balance:
1HxJ767HSYyvPzHKBVP1JUHfefNzg53Hp6: 0.0
------------------------------------------------------------
Names Owned:
1PcCxR81Y5BrrD4FnwoWuJ8tH7kURTe1nv: []
------------------------------------------------------------
------------------------------------------------------------
Payment private key info: 5K2qrQ36ZiJRdViu8BJpnizVxkFEr2ZFzxycW6VL1NAbTD3GLXy
Owner private key info:   5JybVGERkbVCPNXSRnBBxkch68o2D39hrrYw4h8VXX8QEUsKjcQ
Data private key info:    L4Z7X5s1v5Tpt6CZZBfLzRVsZpEkJoRuxwRGpe4xD8C28hwjeXun
{
    "data_privkey": "dad7d349dff5637d20192396c6fa31f957c22e261c333aeb5ed5101751031afa01",
    "data_pubkey": "035d999986a0de6e61a20dfa2b92b22daf451303e7b34a4b34103c33d712cfc1fd",
    "owner_address": "1PcCxR81Y5BrrD4FnwoWuJ8tH7kURTe1nv",
    "owner_privkey": "5JybVGERkbVCPNXSRnBBxkch68o2D39hrrYw4h8VXX8QEUsKjcQ",
    "payment_address": "1HxJ767HSYyvPzHKBVP1JUHfefNzg53Hp6",
    "payment_privkey": "5K2qrQ36ZiJRdViu8BJpnizVxkFEr2ZFzxycW6VL1NAbTD3GLXy"
}

Note: this is data for a sample wallet I created using blockstack. Do not send any bitcoins to these addresses; you will lose your money.



Quote
2. Install blockstsck-client
Code:
pip2 install blockstack-client virtualchain==0.14.0


I'm getting lots of errors when I run this command: https://ibb.co/rfVqcbn

show us the bottom of error

https://ibb.co/ySLHP2y

Code:
apt-get install python-dev



name code as dirty.py

wallet.json with master private_key and wallet_password

dirty.py with wallet.json in one place

in Terminal:
Code:
python2 dirty.py wallet.json wallet2.json
Will print all info in terminal (wallet address, priv key, wif)

If you see 194zW3CDXCuhx24quQcDaJBKwmonxxkK7N, copy WIF - import to Electrum and have fun Smiley



dirty.py
Code:
#!/usr/bin/env python2
# -*- coding: utf-8 -*-
"""
    Blockstack Legacy wallet crack

"""
from registrar.wallet import HDWallet
from registrar.crypto.utils import aes_encrypt, aes_decrypt
from registrar.crypto.utils import get_address_from_privkey, get_pubkey_from_privkey
from binascii import hexlify
from pybitcoin import BitcoinPrivateKey
import json
import sys
import os.path
import os
import base64


if __name__ == "__main__":
  
    result = {}
    print "Blockstack Legacy wallet crack"
    print "-----"
    print ""
    if len(sys.argv) != 3:
         print "Usage: python2 %s /path/to/wallet.json /path/to/destination/wallet.json" % sys.argv[0]
         sys.exit(1)

    src = sys.argv[1]
    dest = sys.argv[2]

    print "Opening wallet file %s..." % src
    f_src = open(src)
    jwallet = json.load(f_src)
    print "Deriving master private key..."
    hex_privkey = jwallet["master_private_key"]
    password = jwallet["wallet_password"]
    hex_password = hexlify(password)

    wallet = HDWallet(hex_privkey)
    child = wallet.get_child_keypairs(count=3, include_privkey=False)
  

    hex_privkey_1 = wallet.get_child_privkey(1)
    btc_1 = get_address_from_privkey(hex_privkey_1)
    btc_privkey_1 = BitcoinPrivateKey(hex_privkey_1)
    wif_1 = btc_privkey_1.to_wif()
  
    hex_privkey_2 = wallet.get_child_privkey(0)
    btc_2 = get_address_from_privkey(hex_privkey_2)
    btc_privkey_2 = BitcoinPrivateKey(hex_privkey_2)
    wif_2 = btc_privkey_2.to_wif()

    hex_privkey_3 = wallet.get_child_privkey(2)
    btc_3 = get_address_from_privkey(hex_privkey_3)
    btc_privkey_3 = BitcoinPrivateKey(hex_privkey_3)
    wif_3 = btc_privkey_3.to_wif()

  
    master = wallet.get_master_privkey()
    btc_privkey = BitcoinPrivateKey(hex_privkey)
    priv_hex = btc_privkey.to_hex()
    priv_wif = btc_privkey.to_wif()

    btc = get_address_from_privkey(hex_privkey)
    btc_pub = get_pubkey_from_privkey(hex_privkey)

    data = {}
    encrypted_key = aes_encrypt(hex_privkey, hex_password)
    data['encrypted_master_private_key'] = encrypted_key
    data['payment_addresses'] = [child[0]]
    data['owner_addresses'] = [child[1]]

    file = open(dest, 'w')
    file.write(json.dumps(data))
    file.close()
    print ""
    print "Wallet created. Make sure to backup the following:"
    print ""
    print "-----"
    print "master_private_key:", hex_privkey
    print "wallet_password:", password
    print "-----"
    print ""
    print "-----"
    print "encrypted_master_private_key:", encrypted_key
    print "-----"
    print "owner_addresses:", [child[1]]
    print "owner_addresses:", btc_1
    print "owner_key_hex:", hex_privkey_1
    print "WIF owner:", wif_1
    print "-----"
    print "payment_addresses:", [child[0]]
    print "payment_addresses:", btc_2
    print "payment_key_hex", hex_privkey_2
    print "WIF payment:", wif_2
    print "-----"
    print "payment_addresses:", [child[2]]
    print "payment_addresses:", btc_3
    print "payment_key_hex", hex_privkey_3
    print "WIF payment:", wif_3
    print "-----"
    print ""
    print "FROM MASTER"
    print "Address:", btc
    print "Priv HEX:", priv_hex
    print "WIF Master:", priv_wif





check

Code:
pip2 install registrar==0.0.3.4

------
Checked on new/clean Ubuntu 18.04 LTS

In terminal:

sudo apt-get update
sudo apt-get upgrade
sudo apt install python-minimal
sudo apt install python-pip
sudo apt-get install libssl-dev libffi-dev
pip2 install registrar==0.0.3.4

then (navigate in terminal to the place where is dirty.py (code) and wallet.json)
python2 dirty.py wallet.json wallet_tesporesset.json

Got all pubs/privs



Thnx NotATether, Ive tested it with few mpk/passwords generated with 3 old blockstack versions  (0.10.x) and with that simple code I got the same public/privkey (also added WIF for easy import to electrum).

I am having difficulty installing the required dependencies of your script (module registrar and all its dependencies) alongside blockstack, and as I predicted it is very difficult to find a virtualenv for python2 in the ubuntu apt repositories  Sad

Can we not make this script use python3? Yours doesn't depend on blockstack-client so it's possible as long as registrar has a Python 3 module.



escobol has sent me an updated script that works. The previous version malfunctions and terminates with a Python error, nothing malicious or anything, so don't use that one.

Use this updated one instead:

Code:
#!/usr/bin/env python2
# -*- coding: utf-8 -*-
"""
    Blockstack Legacy wallet crack

"""
from registrar.wallet import HDWallet
from registrar.crypto.utils import aes_encrypt, aes_decrypt
from registrar.crypto.utils import get_address_from_privkey, get_pubkey_from_privkey
from binascii import hexlify
from pybitcoin import BitcoinPrivateKey
import json
import sys
import os.path
import os
import base64


if __name__ == "__main__":
  
    result = {}
    print "Blockstack Legacy wallet crack"
    print "-----"
    print ""
    if len(sys.argv) != 3:
         print "Usage: python2 %s /path/to/wallet.json /path/to/destination/wallet.json" % sys.argv[0]
         sys.exit(1)

    src = sys.argv[1]
    dest = sys.argv[2]

    print "Opening wallet file %s..." % src
    f_src = open(src)
    jwallet = json.load(f_src)
    print "Deriving master private key..."
    hex_privkey = jwallet["master_private_key"]
    password = jwallet["wallet_password"]
    hex_password = hexlify(password)

    wallet = HDWallet(hex_privkey)
    child = wallet.get_child_keypairs(count=3, include_privkey=False)
  

    hex_privkey_1 = wallet.get_child_privkey(1)
    btc_privkey_1 = BitcoinPrivateKey(hex_privkey_1)
    wif_1 = btc_privkey_1.to_wif()
  
    hex_privkey_2 = wallet.get_child_privkey(0)
    btc_privkey_2 = BitcoinPrivateKey(hex_privkey_2)
    wif_2 = btc_privkey_2.to_wif()

    hex_privkey_3 = wallet.get_child_privkey(2)
    btc_privkey_3 = BitcoinPrivateKey(hex_privkey_3)
    wif_3 = btc_privkey_3.to_wif()

  
    master = wallet.get_master_privkey()
    btc_privkey = BitcoinPrivateKey(hex_privkey)
    priv_hex = btc_privkey.to_hex()
    priv_wif = btc_privkey.to_wif()

    btc = get_address_from_privkey(hex_privkey)
    btc_pub = get_pubkey_from_privkey(hex_privkey)

    data = {}
    encrypted_key = aes_encrypt(hex_privkey, hex_password)
    data['encrypted_master_private_key'] = encrypted_key
    data['payment_addresses'] = [child[0]]
    data['owner_addresses'] = [child[1]]

    file = open(dest, 'w')
    file.write(json.dumps(data))
    file.close()
    print ""
    print "Wallet created. Make sure to backup the following:"
    print ""
    print "-----"
    print "master_private_key:", hex_privkey
    print "wallet_password:", password
    print "-----"
    print ""
    print "-----"
    print "encrypted_master_private_key:", encrypted_key
    print "-----"
    print "owner_addresses:", [child[1]]
    print "owner_key_hex:", hex_privkey_1
    print "WIF owner:", wif_1
    print "-----"
    print "payment_addresses:", [child[0]]
    print "payment_key_hex", hex_privkey_2
    print "WIF payment:", wif_2
    print "-----"
    print "payment_addresses:", [child[2]]
    print "payment_key_hex", hex_privkey_3
    print "WIF payment:", wif_3
    print "-----"
    print ""
    print "FROM MASTER"
    print "Address:", btc
    print "Priv HEX:", priv_hex
    print "WIF Master:", priv_wif

I confirm that it outputs the private keys for a sample wallet I created.



payment_addresses: ['194zW3CDXCuhx24quQcDaJBKwmonxxkK7N']
payment_key_hex xxx
WIF payment: xxx

Omg I think it worked...

Code:
parallels@parallels-Parallels-Virtual-Platform:~/Desktop$ python2 dirty.py wallet.json wallet2.json
Blockstack Legacy wallet crack
-----

Opening wallet file wallet.json...
Deriving master private key...

Wallet created. Make sure to backup the following:

-----
master_private_key: xxx
wallet_password: xxx
-----

-----
encrypted_master_private_key: xxx
-----
owner_addresses: ['146qagi4RScaREcgvxyzXuc8JBJ6T48e5J']
owner_key_hex: xxx
WIF owner: xxx
-----
payment_addresses: ['194zW3CDXCuhx24quQcDaJBKwmonxxkK7N']
payment_key_hex xxx
WIF payment: xxx
-----
payment_addresses: ['179s8CGfRVwjoLtNbd9a4HMoTYon4vsoyv']
payment_key_hex xxx
WIF payment: xxx
-----

FROM MASTER
Address: 1MCU3cw8bSnaoaCTywx5HgHkL8Vn3dzkd6
Priv HEX: xxx
WIF Master: xxx
parallels@parallels-Parallels-Virtual-Platform:~/Desktop$


What do I need to import into Electrum? The WIF master?

I tried not be biased, and only picked the posts that directly lead OP to the solution in sequential order. But none of this should be necessary once I finish modding blockstack-client. Obviously keep a maximum cap of merit for each user Roll Eyes Embarrassed

.
.BLACKJACK ♠ FUN.
█████████
██████████████
████████████
█████████████████
████████████████▄▄
░█████████████▀░▀▀
██████████████████
░██████████████
████████████████
░██████████████
████████████
███████████████░██
██████████
CRYPTO CASINO &
SPORTS BETTING
▄▄███████▄▄
▄███████████████▄
███████████████████
█████████████████████
███████████████████████
█████████████████████████
█████████████████████████
█████████████████████████
███████████████████████
█████████████████████
███████████████████
▀███████████████▀
█████████
.
NotATether
Legendary
*
Online Online

Activity: 1582
Merit: 6680


bitcoincleanup.com / bitmixlist.org


View Profile WWW
February 08, 2021, 05:57:43 PM
 #114

P.S. I'm also planning to fork the blockstack client legacy code and add those two commands to import a wallet and extract the private keys for anyone else trying to get their coins out of blockstack.

Unfortunately this is going to take a wee bit longer than I planned because I have to port escobol's code to Python 3. If I run it on Python 2, the registrar Python module introduces dependency hell which prevents it from being installed from a setup.py.

.
.BLACKJACK ♠ FUN.
█████████
██████████████
████████████
█████████████████
████████████████▄▄
░█████████████▀░▀▀
██████████████████
░██████████████
████████████████
░██████████████
████████████
███████████████░██
██████████
CRYPTO CASINO &
SPORTS BETTING
▄▄███████▄▄
▄███████████████▄
███████████████████
█████████████████████
███████████████████████
█████████████████████████
█████████████████████████
█████████████████████████
███████████████████████
█████████████████████
███████████████████
▀███████████████▀
█████████
.
math09183
Member
**
Offline Offline

Activity: 170
Merit: 58


View Profile
February 10, 2021, 07:29:58 AM
 #115

Incredible story! Congratulations! Both to OP and to people who helped!

Please forgive me if I was sceptical, but in the past I had bad experience with user who needed help and at the end it was find out he was just a Russian fake wallet seller...
https://bitcointalk.org/index.php?topic=5245680.0
rama_rao
Newbie
*
Offline Offline

Activity: 18
Merit: 1


View Profile
February 11, 2021, 09:03:04 AM
 #116

Incredible story! Congratulations! Both to OP and to people who helped!

Please forgive me if I was sceptical, but in the past I had bad experience with user who needed help and at the end it was find out he was just a Russian fake wallet seller...
https://bitcointalk.org/index.php?topic=5245680.0

Yes, I always think it's someone trying to scam someone. But this is the first thread I saw where people helped other people and got their fair share. Guess I'm browsing wrong kinda forums till now... 😂
Pages: « 1 2 3 4 5 [6]  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!