忘记steem账号密码后,用 python 提取 beem 本地钱包里私钥


steem 账号有四个密码:"owner", "active", "posting", "memo".
0.jpg
各司其职,增加了使用安全,但也带来了密码记忆的困难.

正常情况下,用专门的文件保存一份,但文件也有被损坏的时候.

最近就把账号密码搞丢了,怎么办?

后来想想,用这个这个账号研究 steem 的 python编程时,导入过 beem的本地钱包里面,看看能不能提取出来.

想到这儿,立马开干.

获取本地钱包内私钥(get_private_key_from_beempy_wallet.py):

#!/usr/bin/python

-*- coding: UTF-8 -*-

# python get_private_key_from_beempy_wallet.py

python get_private_key_from_beempy_wallet.py sample


import sys
import json
from beem import Steem
from beem.instance import shared_steem_instance

输入本地钱包密码或在代码中直接赋值

# Enter the local wallet password or set value directly in the code

password = input('local wallet password : ')

password = "wallet8password"

stm = shared_steem_instance()
stm.wallet.unlock(password)
private_key = {}

try:
account = sys.argv[1]
except Exception as e:
account = None

if not account:
account = input('steem account username: ')

for role in ["owner", "active", "posting", "memo"]:
try:
private_key[role] = stm.wallet.getKeyForAccount(account, role)
except Exception as e:
print('no', role, ' key in local wallet for', account)

print('private_key:', json.dumps(private_key, indent=4))

执行程序:python get_private_key_from_beempy_wallet.py


Comments 11


!shop

07.02.2020 06:20
0

According to the Bible, Are Christians forbidden to eat Hare? (Part 3 of 5)

(Sorry for sending this comment. We are not looking for our self profit, our intentions is to preach the words of God in any means possible.)



Comment what you understand of our Youtube Video to receive our full votes. We have 30,000 #SteemPower. It's our little way to Thank you, our beloved friend.

Check our Discord Chat
Join our Official Community: https://beta.steemit.com/trending/hive-182074

07.02.2020 06:25
0

This post earned a total payout of 1.334$ and 0.667$ worth of author reward that was liquified using @likwid.
Learn more.

14.02.2020 06:19
0

This post earned a total payout of 0.054$ and 0.027$ worth of author reward that was liquified using @likwid.
Learn more.

21.02.2020 06:20
0

!likwid

21.02.2020 09:19
0

This post has no sub-beneficiaries

21.02.2020 09:20
0

This post earned a total payout of 0.044$ and 0.022$ worth of author reward that was liquified using @likwid.
Learn more.

28.02.2020 09:22
0

!likwid

01.03.2020 18:44
0

This post has no sub-beneficiaries

01.03.2020 18:45
0

This post earned a total payout of 0.000$ and 0$ worth of author reward that was liquified using @likwid.
Learn more.

08.03.2020 18:46
0