HexCheck is a graphical tool built with tkinter in Python that provides a visual representation of server statuses using hexagonal tiles.
- Dynamic Server Configuration: Load server configurations from a file, allowing for easy modification and expansion.
- Ping Check: Determine if a server is alive using the
pingcommand. - Port Check: Test if a specific port is open on the server.
- Visual Feedback:
- Hexagon turns red if the server is not reachable.
- Hexagon turns green if the server is alive and the specified port is open.
- Hexagon turns blue if the server is alive but the specified port is closed.
- Dynamic Hexagon Positioning: Hexagons are positioned dynamically based on screen width. If there are too many hexagons for one row, they wrap to the next row.
- Interactive UI:
- Right-click context menu with options to toggle fullscreen mode or exit the application.
- Periodic automatic updates to refresh server status.
- Modern Font & Design: Uses modern fonts available on Windows for a sleek look.
-
Utility Functions:
is_host_alive(ip): Checks if a host is alive using thepingcommand.is_port_open(ip, port, timeout=1): Checks if a specific port is open on a given IP.get_hexagon_status_color(ip, port): Determines the color of a hexagon based on server and port status.
-
Visualization Functions:
draw_hexagon(canvas, x, y, size, fill_color, name): Draws a single hexagon on the canvas.update_hexagon_color(x, y, size, fill_color, canvas_item): Updates the color of an existing hexagon.draw_all_hexagons(canvas, servers): Draws all hexagons based on the provided server list.adjust_canvas_size(canvas, servers): Adjusts the canvas size to fit all hexagons.
-
Configuration Management:
parse_config(filename): Parses a configuration file to obtain a list of servers.
-
UI Event Handlers:
update_canvas(): Periodically updates the status of all servers and refreshes their colors.toggle_fullscreen(event=None): Toggles the application between fullscreen and windowed mode.create_context_menu(event): Displays a context menu on right-click.