Created
November 22, 2018 11:43
-
-
Save SomberNight/f187aecb4565ead78800c0e0ced3410f to your computer and use it in GitHub Desktop.
Decrypt Electrum wallet file
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import sys | |
import getpass | |
from electrum.storage import WalletStorage | |
########## | |
# Set the path to your wallet file here. | |
# | |
path = "C:/Users/User/AppData/Roaming/Electrum/testnet/wallets/test_segwit_asdasd" | |
########## | |
s = WalletStorage(path) | |
if not s.file_exists(): | |
print("No wallet file at path!") | |
sys.exit(0) | |
if not s.is_encrypted(): | |
print("This wallet is not encrypted!") | |
sys.exit(0) | |
password = getpass.getpass("Enter your wallet password:", stream=None) | |
s.decrypt(password) | |
s.set_password(None) | |
s.write() | |
print("Wallet decrypted.") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment