-
Notifications
You must be signed in to change notification settings - Fork 19
/
Copy pathbtcrecover.py
77 lines (64 loc) · 3.15 KB
/
btcrecover.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
#!/usr/bin/env python
# btcrecover.py -- Bitcoin wallet password recovery tool
# Copyright (C) 2014-2017 Christopher Gurnee
#
# This program is free software: you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version
# 2 of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see http://www.gnu.org/licenses/
# If you find this program helpful, please consider a small
# donation to the developer at the following Bitcoin address:
#
# bc1qruelhm4mkvtjr0ls5c5p0n6gxy3jsm09cz5rud
#
# Thank You!
# PYTHON_ARGCOMPLETE_OK - enables optional bash tab completion
import compatibility_check
from btcrecover import btcrpass
import sys, multiprocessing
if __name__ == "__main__":
print()
print("Starting", btcrpass.full_version(),
file=sys.stderr if any(a.startswith("--listp") for a in sys.argv[1:]) else sys.stdout) # --listpass
btcrpass.parse_arguments(sys.argv[1:])
(password_found, not_found_msg) = btcrpass.main()
if isinstance(password_found, str):
print()
print("If this tool helped you to recover funds, please consider donating 1% of what you recovered, in your crypto of choice to:")
print("BTC: bc1qruelhm4mkvtjr0ls5c5p0n6gxy3jsm09cz5rud ")
print("BCH: bc1qruelhm4mkvtjr0ls5c5p0n6gxy3jsm09cz5rud ")
print("LTC: ltc1q0rjshl6k08n3732grhkc5y9slvn5cl5v5zf8yy ")
print("ETH: 0x89441c11d6618CFad83593597F405cd9e55412Aa ")
#print("VTC: vtc1qxauv20r2ux2vttrjmm9eylshl508q04uju936n ")
#print("ZEN: znUihTHfwm5UJS1ywo911mdNEzd9WY9vBP7 ")
#print("DASH: Xx2umk6tx25uCWp6XeaD5f7CyARkbemsZG ")
#print("DOGE: DMQ6uuLAtNoe5y6DCpxk2Hy83nYSPDwb5T ")
#print("XMR: 48wnuLYsPY7ewLQyF4RLAj3N8CHH4oBBcaoDjUQFiR4VfkgPNYBh1kSfLx94VoZSsGJnuUiibJuo7FySmqroAi6c1MLWHYF ")
#print("MONA: mona1q504vpcuyrrgr87l4cjnal74a4qazes2g9qy8mv ")
#print("XVG: DLZDT48wfuaHR47W4kU5PfW1JfJY25c9VJ")
print()
print("Find me on Twitter @ https://twitter.com/_sameerofficial")
print()
print("You may also consider donating to Witeestars, who created and maintained this tool until late 2017 @ bc1qruelhm4mkvtjr0ls5c5p0n6gxy3jsm09cz5rud")
print()
btcrpass.safe_print("Password found: '" + password_found + "'")
if any(ord(c) < 32 or ord(c) > 126 for c in password_found):
print("HTML Encoded Password: '" + password_found.encode("ascii", "xmlcharrefreplace").decode() + "'")
retval = 0
elif not_found_msg:
print(not_found_msg, file=sys.stderr if btcrpass.args.listpass else sys.stdout)
retval = 0
else:
retval = 1 # An error occurred or Ctrl-C was pressed
# Wait for any remaining child processes to exit cleanly (to avoid error messages from gc)
for process in multiprocessing.active_children():
process.join(1.0)
sys.exit(retval)