Skip to content
Merged
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
2 changes: 1 addition & 1 deletion __main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ def run_health_check():
if len(states) > 0:
num_gpus = len(states[0].get_temps())
else:
errors.append("Faild to retrieve one successful cracker state, most likely due to failing.")
errors.append("Failed to retrieve one successful cracker state, most likely due to failing.")
num_gpus = 0
query = copy_and_set_token(dict_sendHealthCheck, CONFIG.get_value('token'))
query['checkId'] = check_id
Expand Down
25 changes: 20 additions & 5 deletions htpclient/hashcat_cracker.py
Original file line number Diff line number Diff line change
Expand Up @@ -720,11 +720,26 @@ def agent_stopped(self):
return self.wasStopped

def run_health_check(self, attack, hashlist_alias):
args = " --machine-readable --quiet"
args += " --restore-disable --potfile-disable --session=health "
args += update_files(attack).replace(hashlist_alias, "'" + self.config.get_value('hashlists-path') + "/health_check.txt'")
args += " -o '" + self.config.get_value('hashlists-path') + "/health_check.out'"
full_cmd = f"{self.callPath}" + args
args = []
args.append('--machine-readable')
args.append('--quiet')
args.append('--restore-disable')
args.append('--potfile-disable')
args.append('--session=health')
attackcmd = update_files(attack)
hashlist_path = Path(self.config.get_value('hashlists-path'), "health_check.txt")
hashlist_out_path = Path(self.config.get_value('hashlists-path'), "health_check.out")

# Replace #HL# with the real hashlist
attackcmd = attackcmd.replace(hashlist_alias, f'"{hashlist_path}"')

args.append(attackcmd)
args.append('-o')
args.append(f'"{hashlist_out_path}"')

full_cmd = ' '.join(args)
full_cmd = f"{self.callPath} {full_cmd}"

if Initialize.get_os() == 1:
full_cmd = full_cmd.replace("/", '\\')
logging.debug(f"CALL: {''.join(full_cmd)}")
Expand Down