This repository has been archived by the owner on Aug 9, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
bd2ece3
commit 94cc5ce
Showing
1 changed file
with
5 additions
and
5 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -23,7 +23,7 @@ | |
import sys | ||
import os | ||
|
||
version = "2.5.6" | ||
version = "2.5.7" | ||
rows, columns = os.popen("stty size", "r").read().split() | ||
|
||
parser = argparse.ArgumentParser(prog="cth.py", usage="./%(prog)s -H <HASH> [OPTIONS] -T <NUM> -w <WORDLIST>", description="Ultra fast hashcracking tool written in Python3", epilog="Thank you for using this tool! Please take a moment and give some feedback on the tool: @0xblackbird or [email protected]") | ||
|
@@ -88,16 +88,16 @@ def typeText(text, delay): | |
if update == True: | ||
file = os.path.abspath("cth.py") | ||
url = "https://github.com/0xblackbird/cth/releases/download/v" + version + "/cth.py" | ||
jsonFile = "https://0xblackbird.github.io/data.json" | ||
|
||
if os.path.isfile(file) == False: | ||
print(color.RED + "[-] Error! I could not find the script to update! Please provide the installation path:" + color.END) | ||
file = str(input(color.BLUE + ">>> " + color.RED)) | ||
|
||
get_data = urllib.request.urlopen("https://0xblackbird.github.io/cth.json") | ||
get_data = urllib.request.urlopen(jsonFile) | ||
if get_data.getcode() == 200: | ||
jdata = get_data.read() | ||
jsonData = json.loads(jdata) | ||
current_version = jsonData["version"] | ||
jsonData = json.loads(get_data.read()) | ||
current_version = jsonData['tools']['tool0']['version'] | ||
if current_version == version: | ||
print(color.GREEN + "[+] You already have the latest version of CTH! v" + current_version + color.END) | ||
sys.exit() | ||
|