Skip to content

Commit

Permalink
refactor/reshape
Browse files Browse the repository at this point in the history
  • Loading branch information
CyberRoute committed Oct 3, 2024
1 parent ba68312 commit daab932
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 6 deletions.
8 changes: 2 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -104,15 +104,11 @@ Ensure the following dependencies are installed:
- Click on the **"Scan"** button in the UI to initiate a network scan.
- The tool will display a list of all detected devices in the network, including their IP addresses, MAC addresses, hostnames, and vendors.
3. **Viewing Packets**:
- The tool also captures ARP packets in real-time. You can view these packets in a separate tab within the GUI.
4. **Device Details**:
3. **Device Details**:
- Click on any device in the list to open a detailed window that shows more information about that particular device.
5. **Stopping the Scan**:
4. **Stopping the Scan**:
- Press the **"Quit"** button to stop the ARP scan and close the application.
Expand Down
18 changes: 18 additions & 0 deletions core/arp_scanner.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,8 +90,26 @@ def add_static_ui_labels(self):
os_label = QLabel(f"OS: {get_os()}")
os_label.setStyleSheet("color: black")

# Adding additional network info
local_ip_address = get_if_addr(self.interface)
local_ip_label = QLabel(f"Local IP Address: {local_ip_address}")
local_ip_label.setStyleSheet("color: black")

# Corrected variable name to get the default gateway correctly
default_gateway = netifaces.gateways()[2][0][0]
default_gateway_label = QLabel(f"Default Gateway: {default_gateway}")
default_gateway_label.setStyleSheet("color: black")

local_mac_address = netifaces.ifaddresses(self.interface)[netifaces.AF_LINK][0]['addr']
local_mac_label = QLabel(f"Local MAC Address: {local_mac_address}")
local_mac_label.setStyleSheet("color: black")

# Add labels to the vertical layout
self._ui.verticalLayout.addWidget(os_label)
self._ui.verticalLayout.addWidget(interface_label)
self._ui.verticalLayout.addWidget(local_ip_label)
self._ui.verticalLayout.addWidget(default_gateway_label)
self._ui.verticalLayout.addWidget(local_mac_label)

def setup_font_for_list_widgets(self):
"""Sets up a uniform font for list widgets."""
Expand Down
Binary file modified images/phantom.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit daab932

Please sign in to comment.