Skip to content
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
Binary file modified ui/__pycache__/ai_training_window.cpython-310.pyc
Binary file not shown.
Binary file modified ui/__pycache__/analytics_window.cpython-310.pyc
Binary file not shown.
Binary file modified ui/__pycache__/hash_cracker_window.cpython-310.pyc
Binary file not shown.
Binary file modified ui/__pycache__/hybrid_attack_window.cpython-310.pyc
Binary file not shown.
Binary file modified ui/__pycache__/launcher.cpython-310.pyc
Binary file not shown.
Binary file modified ui/__pycache__/nav_manager.cpython-310.pyc
Binary file not shown.
Binary file modified ui/__pycache__/rainbow_table_window.cpython-310.pyc
Binary file not shown.
Binary file modified ui/__pycache__/reports_window.cpython-310.pyc
Binary file not shown.
Binary file modified ui/__pycache__/rule_engine_window.cpython-310.pyc
Binary file not shown.
Binary file modified ui/__pycache__/wordlist_generator_window.cpython-310.pyc
Binary file not shown.
18 changes: 9 additions & 9 deletions ui/ai_training_window.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ def _build_titlebar(self):

def _build_body(self):
frame = tk.Frame(self, bg=BG_DARK)
frame.pack(fill="x", padx=16, pady=(14, 0))
frame.pack(fill="x", padx=16, pady=(12, 0))

tk.Label(frame,
text="TRAINING WORDLIST",
Expand Down Expand Up @@ -79,7 +79,7 @@ def _build_body(self):
tk.Label(frame, text="MODEL STATS",
bg=BG_DARK, fg=FG_MUTED,
font=("Courier", 8)).pack(
anchor="w", pady=(14, 4))
anchor="w", pady=(12, 4))

self.stat_vars = {
"Trained on": tk.StringVar(value="0"),
Expand Down Expand Up @@ -107,22 +107,22 @@ def _build_body(self):
bg=BG_CARD,
fg=colors.get(label, FG_BLUE),
font=("Courier",14,"bold")
).pack(pady=(8,2))
).pack(pady=(12,6))
tk.Label(card, text=label,
bg=BG_CARD, fg=FG_MUTED,
font=("Courier",8)
).pack(pady=(0,8))
).pack(pady=(0,12))

# Progress
self.progress = ttk.Progressbar(
frame, mode="determinate",
maximum=100, value=0)
self.progress.pack(fill="x", pady=(12,0))
self.progress.pack(fill="x", pady=(16,0))
self.prog_label = tk.Label(
frame, text="0% · waiting...",
bg=BG_DARK, fg=FG_MUTED,
font=("Courier",8))
self.prog_label.pack(anchor="w", pady=2)
self.prog_label.pack(anchor="w", pady=4)

def _browse(self):
path = filedialog.askopenfilename(
Expand All @@ -133,7 +133,7 @@ def _browse(self):

def _build_buttons(self):
frame = tk.Frame(self, bg=BG_DARK)
frame.pack(fill="x", padx=16, pady=(10,6))
frame.pack(fill="x", padx=16, pady=(10, 8))

self.train_btn = tk.Button(
frame,
Expand All @@ -144,7 +144,7 @@ def _build_buttons(self):
command=self._train)
self.train_btn.pack(side="left", expand=True,
fill="x", padx=(0,6),
ipady=10)
ipady=11)

tk.Button(frame, text="Reset Models",
bg=BG_DARK, fg=FG_RED,
Expand Down Expand Up @@ -174,7 +174,7 @@ def _build_statusbar(self):
def _build_log(self):
frame = tk.Frame(self, bg=BG_DARK)
frame.pack(fill="both", expand=True,
padx=16, pady=(6,4))
padx=16, pady=(6,8))
tk.Label(frame, text="TRAINING LOG",
bg=BG_DARK, fg=FG_MUTED,
font=("Courier",8)).pack(
Expand Down
17 changes: 7 additions & 10 deletions ui/analytics_window.py
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ def _build_titlebar(self):
def _build_input_row(self):
frame = tk.Frame(self, bg=BG_DARK)
frame.pack(fill="x", padx=16,
pady=(10, 0))
pady=(12, 0))

tk.Label(frame,
text="LOAD RESULTS — browse a "
Expand Down Expand Up @@ -196,7 +196,7 @@ def _browse_csv(self):
def _build_summary_cards(self):
frame = tk.Frame(self, bg=BG_DARK)
frame.pack(fill="x", padx=16,
pady=(10, 0))
pady=(12, 0))

self.summary_vars = {
"Total": tk.StringVar(value="0"),
Expand Down Expand Up @@ -238,8 +238,7 @@ def _build_summary_cards(self):
# ── Charts area ───────────────────────────────────
def _build_charts_area(self):
outer = tk.Frame(self, bg=BG_DARK)
outer.pack(fill="x", padx=16,
pady=(10, 0))
outer.pack(fill="x", padx=16, pady=(12, 0)) # Fixed height section
outer.columnconfigure(0, weight=1)
outer.columnconfigure(1, weight=1)
outer.columnconfigure(2, weight=1)
Expand Down Expand Up @@ -307,8 +306,7 @@ def _build_charts_area(self):
# ── Top passwords + password tester ───────────────
def _build_top_passwords(self):
outer = tk.Frame(self, bg=BG_DARK)
outer.pack(fill="x", padx=16,
pady=(10, 0))
outer.pack(fill="both", expand=True, padx=16, pady=(12, 0))
outer.columnconfigure(0, weight=1)
outer.columnconfigure(1, weight=1)

Expand Down Expand Up @@ -353,7 +351,7 @@ def _build_top_passwords(self):
columns=cols,
show="headings",
style="Analytics.Treeview",
height=6)
height=8) # Increased from 6

for col, txt, w in [
("rank", "#", 30),
Expand Down Expand Up @@ -460,8 +458,7 @@ def _build_top_passwords(self):
# ── Buttons ───────────────────────────────────────
def _build_buttons(self):
frame = tk.Frame(self, bg=BG_DARK)
frame.pack(fill="x", padx=16,
pady=(10, 6))
frame.pack(fill="x", padx=16, pady=(10, 8))

self.analyse_btn = tk.Button(
frame,
Expand Down Expand Up @@ -663,7 +660,7 @@ def _draw_bar_chart(self, canvas,
colors: dict,
max_val: int):
canvas.delete("all")
canvas.update_idletasks()
# canvas.update_idletasks() - Removed to prevent mid-transition flickers
w = canvas.winfo_width() or 300
h = 140
bar_h = 16
Expand Down
3 changes: 2 additions & 1 deletion ui/app_ui.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,8 @@ def start_cracking(hash_entry, wl_entry, output_text):

def open_cracker_window(parent):
"""Opens the hash cracker as a child window from the launcher."""
win = tk.Toplevel(parent) # ← fixed: tk.Toplevel not Tk.Toplevel
win = tk.Toplevel(parent)
win.withdraw()
win.title("Hash Cracker")
win.configure(padx=16, pady=16)
build_ui(win)
10 changes: 5 additions & 5 deletions ui/hash_cracker_window.py
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ def _build_algo_section(self):
# ── Hash preview table ───────────────────────────────────
def _build_hash_preview(self):
frame = tk.Frame(self, bg=BG_DARK)
frame.pack(fill="x", padx=16, pady=(10, 0))
frame.pack(fill="x", padx=16, pady=(6, 0))

tk.Label(frame,
text="LOADED HASHES — AUTO-DETECTED TYPE",
Expand All @@ -170,7 +170,7 @@ def _build_hash_preview(self):

cols = ("Hash Value", "Detected Algorithm", "Length")
self.preview_tree = ttk.Treeview(frame, columns=cols,
show="headings", height=3)
show="headings", height=2) # Reduced from 3
self.preview_tree.heading("Hash Value", text="Hash Value")
self.preview_tree.heading("Detected Algorithm", text="Detected Algorithm")
self.preview_tree.heading("Length", text="Length")
Expand Down Expand Up @@ -201,7 +201,7 @@ def _load_hashes(self):
# ── Stats bar ────────────────────────────────────────────
def _build_stats_bar(self):
frame = tk.Frame(self, bg=BG_DARK)
frame.pack(fill="x", padx=16, pady=(10, 0))
frame.pack(fill="x", padx=16, pady=(8, 0)) # Reduced from 12

self.stat_vars = {
"Total": tk.StringVar(value="0"),
Expand All @@ -225,7 +225,7 @@ def _build_stats_bar(self):
card.pack(side="left", expand=True, fill="x", padx=4)
tk.Label(card, textvariable=var,
bg=BG_CARD, fg=colors[label],
font=("Courier", 16, "bold")).pack(pady=(8, 2))
font=("Courier", 14, "bold")).pack(pady=(6, 2)) # Reduced font from 16 and pady
tk.Label(card, text=label,
bg=BG_CARD, fg=FG_MUTED,
font=("Courier", 8)).pack(pady=(0, 8))
Expand Down Expand Up @@ -256,7 +256,7 @@ def _build_progress(self):
# ── Buttons — packed BEFORE results so always visible ────
def _build_buttons(self):
frame = tk.Frame(self, bg=BG_DARK)
frame.pack(fill="x", padx=16, pady=(10, 6))
frame.pack(fill="x", padx=16, pady=(8, 6)) # Tightened pady

self.start_btn = tk.Button(
frame,
Expand Down
14 changes: 7 additions & 7 deletions ui/hybrid_attack_window.py
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ def _build_titlebar(self):
# ── File selectors ───────────────────────────────────────
def _build_files_section(self):
frame = tk.Frame(self, bg=BG_DARK)
frame.pack(fill="x", padx=16, pady=(10, 0))
frame.pack(fill="x", padx=16, pady=(12, 0))

for label, var in [
("HASH FILE", self.hash_file),
Expand Down Expand Up @@ -153,7 +153,7 @@ def _browse(self, var):
# ── Stage indicators — single row 1×4 ────────────────────
def _build_stage_indicators(self):
frame = tk.Frame(self, bg=BG_DARK)
frame.pack(fill="x", padx=16, pady=(10, 0))
frame.pack(fill="x", padx=16, pady=(12, 0))

tk.Label(frame,
text="ATTACK STAGES — RUNS IN ORDER",
Expand Down Expand Up @@ -201,7 +201,7 @@ def _set_stage(self, name, state):
# ── Mutation rules ───────────────────────────────────────
def _build_mutation_section(self):
frame = tk.Frame(self, bg=BG_DARK)
frame.pack(fill="x", padx=16, pady=(10, 0))
frame.pack(fill="x", padx=16, pady=(12, 0))

tk.Label(frame, text="MUTATION RULES",
bg=BG_DARK, fg=FG_MUTED,
Expand Down Expand Up @@ -258,7 +258,7 @@ def _toggle_rule(self, rule):
# ── Brute force config ───────────────────────────────────
def _build_brute_config(self):
frame = tk.Frame(self, bg=BG_DARK)
frame.pack(fill="x", padx=16, pady=(10, 0))
frame.pack(fill="x", padx=16, pady=(12, 0))

tk.Label(frame, text="BRUTE FORCE CONFIG",
bg=BG_DARK, fg=FG_MUTED,
Expand Down Expand Up @@ -318,7 +318,7 @@ def _build_brute_config(self):
# ── Stats bar ────────────────────────────────────────────
def _build_stats_bar(self):
frame = tk.Frame(self, bg=BG_DARK)
frame.pack(fill="x", padx=16, pady=(10, 0))
frame.pack(fill="x", padx=16, pady=(12, 0))

self.stat_vars = {
"Total": tk.StringVar(value="0"),
Expand Down Expand Up @@ -378,7 +378,7 @@ def _build_progress(self):
# ── Buttons — packed BEFORE log ──────────────────────────
def _build_buttons(self):
frame = tk.Frame(self, bg=BG_DARK)
frame.pack(fill="x", padx=16, pady=(10, 6))
frame.pack(fill="x", padx=16, pady=(10, 8))

# Start
self.start_btn = tk.Button(
Expand All @@ -395,7 +395,7 @@ def _build_buttons(self):
command=self._start)
self.start_btn.pack(
side="left", expand=True,
fill="x", padx=(0, 6), ipady=10)
fill="x", padx=(0, 6), ipady=11)

# Pause
self.pause_btn = tk.Button(
Expand Down
26 changes: 13 additions & 13 deletions ui/launcher.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,15 +31,15 @@ def __init__(self, parent, nav):
def _build_header(self):
# Container frame for logo and text
header_container = tk.Frame(self, bg=BG_DARK)
header_container.pack(fill="x", pady=(20, 0), padx=20)
header_container.pack(fill="x", pady=(18, 10), padx=20) # Added top padding for balance

# Logo placement
try:
logo_path = os.path.join("resources", "logo.png")
if os.path.exists(logo_path):
img = Image.open(logo_path)
# Larger size for better detail visibility
img = img.resize((120, 120), Image.LANCZOS)
# Smaller logo for vertical space
img = img.resize((50, 50), Image.LANCZOS)
# Apply sharpening for crisp edges
img = img.filter(ImageFilter.SHARPEN)
self.logo_img = ImageTk.PhotoImage(img)
Expand Down Expand Up @@ -81,15 +81,15 @@ def _build_header(self):
info_btn.pack(side="right", anchor="n")
tk.Frame(self, bg=BORDER,
height=1).pack(fill="x",
padx=20, pady=14)
padx=20, pady=0)

def _build_mode_selector(self):
outer = tk.Frame(self, bg=BG_DARK)
outer.pack(fill="x", padx=20)
tk.Label(outer, text="SELECT MODE",
bg=BG_DARK, fg=FG_MUTED,
font=("Courier", 8)).pack(
anchor="w", pady=(0, 8))
anchor="w", pady=(5, 5))
row = tk.Frame(outer, bg=BG_DARK)
row.pack(fill="x")

Expand All @@ -114,7 +114,7 @@ def _build_mode_selector(self):
bg=BG_CARD, fg=FG_MUTED,
font=("Courier", 8),
justify="center"
).pack(pady=(0, 10))
).pack(pady=(0, 6))
btn.bind("<Button-1>",
lambda e, n=name:
self._select_mode(n))
Expand Down Expand Up @@ -148,7 +148,7 @@ def _select_mode(self, name):

def _build_module_grid(self):
outer = tk.Frame(self, bg=BG_DARK)
outer.pack(fill="x", padx=20, pady=(16, 0))
outer.pack(fill="x", padx=20, pady=(0, 0))
tk.Label(outer, text="OPEN MODULE",
bg=BG_DARK, fg=FG_MUTED,
font=("Courier", 8)).pack(
Expand Down Expand Up @@ -193,10 +193,10 @@ def _build_module_grid(self):
highlightbackground=BORDER,
cursor="hand2")
card.grid(row=i // 2, column=i % 2,
sticky="ew", padx=4, pady=4)
sticky="ew", padx=4, pady=2)

inner = tk.Frame(card, bg=BG_CARD)
inner.pack(fill="x", padx=12, pady=10)
inner.pack(fill="x", padx=12, pady=6)

tk.Label(inner, text=name,
bg=BG_CARD, fg=FG_PRIMARY,
Expand Down Expand Up @@ -226,7 +226,7 @@ def _build_module_grid(self):

def _build_quick_start(self):
frame = tk.Frame(self, bg=BG_DARK)
frame.pack(fill="x", padx=20, pady=16)
frame.pack(fill="x", padx=20, pady=(2, 12))
tk.Button(frame,
text="▶ Start Quick Crack",
bg=BTN_BLUE, fg="#e0f0ff",
Expand All @@ -236,12 +236,12 @@ def _build_quick_start(self):
activeforeground="#ffffff",
cursor="hand2",
command=self._open_hash_cracker
).pack(fill="x", ipady=10)
).pack(fill="x", ipady=4)

def _build_statusbar(self):
bar = tk.Frame(self, bg=BG_CARD,
height=30)
bar.pack(fill="x", side="bottom")
height=28)
bar.pack(fill="x", side="bottom", pady=(0, 10)) # Added bottom padding for balance
bar.pack_propagate(False)
tk.Label(bar, text="●",
bg=BG_CARD, fg=FG_GREEN,
Expand Down
Loading