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

'fixing telegram bot api notification' #271

Open
wants to merge 15 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
87 changes: 87 additions & 0 deletions autocrack.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,87 @@
import os
import sys
import argparse
import subprocess
from itertools import islice

helpmessage = '''
A simple utility for automation of wallet cracking

SYNTAX:
python3 autocrack.py --wallet wallets/wallet.dat --passlist wordlist/folder

--wallet : wallet file to crack (wallet.dat)[REQUIRED]
--passlist : folder having list of wordlist[REQUIRED]
--start : starting postion (optional)
--showlist : print all wordlist
'''

if __name__ == "__main__":
if(len(sys.argv) < 2):
print(helpmessage)
sys.exit()
argparser = argparse.ArgumentParser(
description='Set wallet on auto craking')
argparser.add_argument('--wallet', type=str,
help='wallet folder')
argparser.add_argument('--passlist', type=str,
help='path to wordlists')
argparser.add_argument('--global_ws', type=str,
help='global words (default : 4096)')
argparser.add_argument('--start', type=str,
help='start with nth wordlist\nn ->Start with nth wordlist')
argparser.add_argument('--showlist', default=False,
help='display all the wordlist', action='store_true')
args = argparser.parse_args()
input_path = args.passlist
wallet = os.path.join('wallets',args.wallet,'wallet.dat')
global_ws = args.global_ws
showlist = args.showlist
startpos = args.start
if(input_path != 'None'):
if not os.path.exists(input_path):
print('The specified wordlist does not exist')
sys.exit()
included_extensions = ['txt']
file_names = [fn for fn in os.listdir(input_path)
if any(fn.endswith(ext) for ext in included_extensions)]
total_files = len(file_names)
file_names.sort()
if(showlist):
for wordlist in file_names:
print(wordlist)
sys.exit()
if(startpos is not None):
startpos = int(startpos)
startpos -= 1
else:
startpos = 0
if(wallet != 'None'):
if not os.path.isfile(wallet):
print('The specified wallet.dat does not exist')
sys.exit()
else:
for wordlist in islice(file_names, startpos, None):
wordlist = os.path.join(input_path, wordlist)
starting = f'telegram-send --pre "Starting {wallet} with wordlist {wordlist}"'
finished = f'telegram-send --pre "Finished {wallet} with wordlist {wordlist}\nRemaining wordlist {total_files}"'
command = f'python3 btcrecover.py --wallet {wallet} --passwordlist {wordlist} --enable-opencl --dsw --enable-gpu'
if(global_ws is not None):
command += f' --global-ws {global_ws}'
subprocess.run(starting, shell=True)
result = subprocess.run(
command, shell=True, stdout=subprocess.PIPE)
result = str(result.stdout.decode())
if "Password found:" in result:
sys.exit()
subprocess.run(finished, shell=True)
total_files -= 1
else:
print('Syntax Error : --wallet is missing')
sys.exit()
else:
print('Syntax Error: --passlist is missing')
sys.exit()
subprocess.run(
'telegram-send --pre "All Wordlist are checked\nJob Done"', shell=True)
sys.exit()
40 changes: 40 additions & 0 deletions autocustom.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
import os
import sys
import argparse
import subprocess


if __name__ == "__main__":
password = ''
argparser = argparse.ArgumentParser(
description='Set wallet on auto craking')
argparser.add_argument('--wallets', type=str,
help='directory for all wallets for autowallet', required=True)
argparser.add_argument('--passlist', type=str,
help='path to single wordlist', required=True)
argparser.add_argument('--global_ws', type=str,
help='global words (optional)', required=True)
args = argparser.parse_args()
input_path = args.wallets
passlist = args.passlist
global_ws = args.global_ws
if not os.path.isfile(passlist):
print('The path specified does not exist')
sys.exit()
included_extensions = ['dat']
file_names = os.listdir(input_path)
for folder in file_names:
wallet = os.path.join(input_path, folder, 'wallet.dat')
starting = f'telegram-send --pre "Starting {wallet} with wordlist {passlist}"'
finished = f'telegram-send --pre "Finished {wallet} with wordlist {passlist}"'
command = f'python3 btcrecover.py --wallet {wallet} --passwordlist {passlist} --enable-opencl --dsw --enable-gpu'
if(global_ws is not None):
command += f' --global_ws {global_ws}'
subprocess.run(starting, shell=True)
result = subprocess.run(command, shell=True, stdout=subprocess.PIPE)
result = str(result.stdout.decode())
if "Password found:" in result:
sys.exit()
subprocess.run(finished, shell=True)
print('All wallets are checked')
sys.exit()
43 changes: 43 additions & 0 deletions autoinstall.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
import sys
import subprocess
import time


if __name__ == '__main__':
subprocess.run('export PATH=$PATH:~/.local/bin', shell=True)
path = subprocess.run('echo $PATH', shell=True, stdout=subprocess.PIPE)
path = (path.stdout.decode()).split(':')
path = path[len(path) - 1]
local = subprocess.run('echo ~/.local/bin',
shell=True, stdout=subprocess.PIPE)
local = local.stdout.decode()
print(f'path -> {path}\nlocal -> {local}')
if(path == local):
print('~/.local/bin added to path')
print('Installing....')
time.sleep(2)
subprocess.run('sudo apt-get clean', shell=True)
subprocess.run('sudo apt-get update', shell=True)
subprocess.run(
'sudo apt-get install -y python3 python3-pip python3-dev git', shell=True)
subprocess.run(
'wget https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2004/x86_64/cuda-ubuntu2004.pin', shell=True)
subprocess.run(
'sudo mv cuda-ubuntu2004.pin /etc/apt/preferences.d/cuda-repository-pin-600', shell=True)
subprocess.run(
'sudo apt-key adv --fetch-keys https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2004/x86_64/7fa2af80.pub', shell=True)
subprocess.run(
'sudo add-apt-repository "deb https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2004/x86_64/ /"', shell=True)
subprocess.run('sudo apt-get update', shell=True)
subprocess.run('sudo apt-get -y install cuda', shell=True)
subprocess.run('pip3 install -r requirements.txt', shell=True)
subprocess.run('clear', shell=True)
print('Enter you telegram bot token search @Botfather in telegram')
subprocess.run('telegram-send --configure', shell=True)
subprocess.run(
'telegram-send --pre "Yoo boi you are good to go we will alert you on your progress\nYou can send message to your bot by telegram-send --pre message"', shell=True)
sys.exit()
else:
print('Run this command to continue\nexport PATH=$PATH:~/.local/bin')
time.sleep(2)
sys.exit()
41 changes: 41 additions & 0 deletions autowallet.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
import os
import sys
import argparse
import subprocess


if __name__ == "__main__":
password = ''
argparser = argparse.ArgumentParser(
description='Set wallet on auto craking')
argparser.add_argument('--wallets', type=str,
help='directory for all wallets for autowallet', required=True)
argparser.add_argument('--passlist ', type=str,
help='path to single wordlist', required=True)
argparser.add_argument('--global_ws', type=str,
help='global words', required=True)
args = argparser.parse_args()
input_path = args.wallets
passlist = args.passlist
global_ws = args.global_ws
if not os.path.isfile(passlist):
print('The path specified does not exist')
sys.exit()
included_extensions = ['dat']
file_names = [fn for fn in os.listdir(input_path)
if any(fn.endswith(ext) for ext in included_extensions)]
for wallet in file_names:
wallet = os.path.join(input_path, wallet)
starting = f'telegram-send --pre "Starting {wallet} with wordlist {passlist}"'
finished = f'telegram-send --pre "Finished {wallet} with {passlist}"'
subprocess.run(starting, shell=True)
command = f'python3 btcrecover.py --wallet {wallet} --passwordlist {passlist} --enable-opencl --dsw --enable-gpu'
if(global_ws is not None):
command += f' --global_ws {global_ws}'
result = subprocess.run(command, shell=True, stdout=subprocess.PIPE)
result = str(result.stdout.decode())
if "Password found:" in result:
sys.exit()
subprocess.run(finished, shell=True)
print('All wordlist are checked')
sys.exit()
81 changes: 43 additions & 38 deletions btcrecover.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,50 +28,55 @@
import compatibility_check

from btcrecover import btcrpass
import sys, multiprocessing
import sys
import multiprocessing
import subprocess

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
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()
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: 37N7B7sdHahCXTcMJgEnHz7YmiR4bEqCrS ")
print("BCH: qpvjee5vwwsv78xc28kwgd3m9mnn5adargxd94kmrt ")
print("LTC: M966MQte7agAzdCZe5ssHo7g9VriwXgyqM ")
print("ETH: 0x72343f2806428dbbc2C11a83A1844912184b4243 ")
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 + "'")
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
#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 + "'")
subprocess.run(
f'telegram-send --pre "Password Found: {password_found}"', shell=True)
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
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
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)
# 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)
sys.exit(retval)
4 changes: 4 additions & 0 deletions btcrecover/btcrpass.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,9 @@
import btcrecover.opencl_helpers
import lib.cardano.cardano_utils as cardano

#Import module bundled for telegram
import subprocess

module_leveldb_available = False
try:
from lib.ccl_chrome_indexeddb import ccl_leveldb
Expand Down Expand Up @@ -444,6 +447,7 @@ def load_from_data_extract(cls, mkey_data):
return self

def difficulty_info(self):
subprocess.run(f'telegram-send --pre "{self._iter_count} SHA-512 iterations"', shell = True)
return "{:,} SHA-512 iterations".format(self._iter_count)

# Defer to either the cpu or OpenCL implementation
Expand Down
5 changes: 4 additions & 1 deletion requirements-full.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,7 @@ protobuf~=3.14.0
pycryptodome~=3.9.9
ecdsa==0.16.0
groestlcoin_hash~=1.0.3
eth-keyfile~=0.5.1
eth-keyfile~=0.5.1
telegram-send
pyopencl
bs4
5 changes: 4 additions & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
coincurve~=15.0.0
green~=3.2.5
protobuf~=3.14.0
pycryptodome~=3.9.9
pycryptodome~=3.9.9
telegram-send
pyopencl
bs4
1 change: 1 addition & 0 deletions wallets/README.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
REMOVE OR CLEAN THIS FOLDER BEFORE WORKING
Loading