From 4dba73e0c975d8333a16452bc19086303fa212a2 Mon Sep 17 00:00:00 2001 From: Justin Bollinger Date: Fri, 13 Feb 2026 20:28:26 -0500 Subject: [PATCH] refactor: simplify Ollama attack to target-based generation only Remove wordlist-based generation option and menu selection. The LLM attack now goes directly to target-based prompts (company, industry, location). Co-Authored-By: Claude Opus 4.6 --- hate_crack/attacks.py | 39 +++++++++++---------------------------- 1 file changed, 11 insertions(+), 28 deletions(-) diff --git a/hate_crack/attacks.py b/hate_crack/attacks.py index 3158c42..d6ba8fd 100644 --- a/hate_crack/attacks.py +++ b/hate_crack/attacks.py @@ -490,31 +490,14 @@ def bandrel_method(ctx: Any) -> None: def ollama_attack(ctx: Any) -> None: print("\n\tLLM Attack") - print("\t(1) Wordlist-based generation") - print("\t(2) Target-based generation") - choice = input("\nSelect generation mode: ").strip() - - if choice == "1": - wordlist = ctx.hcatHashFile + ".out" - if not os.path.isfile(wordlist): - print("Error: No cracked hashes output file found.") - return - print(f"\nUsing wordlist: {wordlist}") - ctx.hcatOllama( - ctx.hcatHashType, ctx.hcatHashFile, "wordlist", wordlist - ) - - elif choice == "2": - company = input("Company name: ").strip() - industry = input("Industry: ").strip() - location = input("Location: ").strip() - target_info = { - "company": company, - "industry": industry, - "location": location, - } - ctx.hcatOllama( - ctx.hcatHashType, ctx.hcatHashFile, "target", target_info - ) - else: - print("Invalid selection.") + company = input("Company name: ").strip() + industry = input("Industry: ").strip() + location = input("Location: ").strip() + target_info = { + "company": company, + "industry": industry, + "location": location, + } + ctx.hcatOllama( + ctx.hcatHashType, ctx.hcatHashFile, "target", target_info + )