mirror of
https://github.com/trustedsec/hate_crack.git
synced 2026-07-28 14:47:22 -07:00
fix(api): resolve save_dir once and report total failure in weakpass menu
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Sonnet 4.6
parent
1c3607b8a8
commit
6d4c7b7da4
+5
-4
@@ -1008,6 +1008,7 @@ def weakpass_wordlist_menu(rank=-1):
|
|||||||
if not indices:
|
if not indices:
|
||||||
print("No valid selection.")
|
print("No valid selection.")
|
||||||
return
|
return
|
||||||
|
save_dir = get_hcat_wordlists_dir()
|
||||||
torrent_files = []
|
torrent_files = []
|
||||||
for idx in indices:
|
for idx in indices:
|
||||||
entry = filtered_wordlists[idx - 1]
|
entry = filtered_wordlists[idx - 1]
|
||||||
@@ -1015,13 +1016,13 @@ def weakpass_wordlist_menu(rank=-1):
|
|||||||
if not torrent_url:
|
if not torrent_url:
|
||||||
print(f"[!] Missing torrent URL for selection {idx}")
|
print(f"[!] Missing torrent URL for selection {idx}")
|
||||||
continue
|
continue
|
||||||
meta = fetch_torrent_metadata(
|
meta = fetch_torrent_metadata(torrent_url, save_dir=save_dir, wordlist_id=entry.get("id"))
|
||||||
torrent_url, wordlist_id=entry.get("id")
|
|
||||||
)
|
|
||||||
if meta:
|
if meta:
|
||||||
torrent_files.append(meta)
|
torrent_files.append(meta)
|
||||||
if torrent_files:
|
if torrent_files:
|
||||||
run_torrent_session(torrent_files, get_hcat_wordlists_dir())
|
run_torrent_session(torrent_files, save_dir)
|
||||||
|
else:
|
||||||
|
print("[!] No torrent metadata files were fetched successfully.")
|
||||||
except KeyboardInterrupt:
|
except KeyboardInterrupt:
|
||||||
print("\nKeyboard interrupt: Returning to main menu...")
|
print("\nKeyboard interrupt: Returning to main menu...")
|
||||||
return
|
return
|
||||||
|
|||||||
Reference in New Issue
Block a user