From ddba4c6c4a1e06f5c15399668bf8f8020617ed8d Mon Sep 17 00:00:00 2001 From: lillyschulte Date: Thu, 15 Dec 2022 21:38:12 +0100 Subject: [PATCH] Dark mode --- main.py | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/main.py b/main.py index f234f0e..94dae48 100644 --- a/main.py +++ b/main.py @@ -9,23 +9,26 @@ window = tk.Tk() window.title("Network Scanner") +# Set the background color of the GUI window to black +window.configure(background="black") + # Create a text area to display the results -text_area = tk.Text(window) +text_area = tk.Text(window, bg="black", fg="white") text_area.pack(fill=tk.BOTH, expand=True) # Create a progress bar -progress_bar = ttk.Progressbar(window, mode="determinate") +progress_bar = ttk.Progressbar(window, mode="determinate",) progress_bar.pack(fill=tk.X) -# Create a Label widget to display the text -label = tk.Label(window, text="Input network ip:") -label.pack() - # Create a checkbox widget to allow the user to include manufacturer information in the results include_manufacturer = tk.BooleanVar() -include_manufacturer_checkbox = tk.Checkbutton(window, text="Include OS", variable=include_manufacturer) +include_manufacturer_checkbox = tk.Checkbutton(window, text="Include OS", variable=include_manufacturer, bg="black", fg="white") include_manufacturer_checkbox.pack() +# Create a Label widget to display the text +label = tk.Label(window, text="Input network ip:", bg="black", fg="white") +label.pack() + # Function to scan the network and display the results def scan_network(): # Get the user input for the network variable @@ -53,6 +56,9 @@ def scan_network(): # Clear the text area text_area.delete(1.0, tk.END) + # Set the progress bar value to 100 + progress_bar["value"] = 100 + # Loop through the output lines for line in output.stdout.decode().splitlines(): # Check for lines containing IP addresses