Skip to content

Commit

Permalink
readme
Browse files Browse the repository at this point in the history
  • Loading branch information
CyberRoute committed Sep 19, 2024
1 parent 0ea1a70 commit 1207186
Show file tree
Hide file tree
Showing 3 changed files with 112 additions and 14 deletions.
109 changes: 108 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1 +1,108 @@
# phantom
# Phantom

## Overview
Phantom is an **ARP Scanner** tool that scans the network and retrieves information about devices connected to the same network. The tool provides details like IP addresses, MAC addresses, hostnames, and the manufacturers of the devices based on their MAC addresses.

The tool features a graphical user interface (GUI) built with **PySide6** (Qt framework) and utilizes **scapy** for ARP scanning.

---

## Features
- **Network Scanning**: Identifies devices on the network via ARP requests.
- **Device Details**: Displays IP address, MAC address, hostname, and vendor information.
- **Real-time Sniffing**: Captures and lists ARP packets in real-time.
- **Graphical User Interface**: Easy-to-use UI to display the scanned devices and packet information.
- **Multithreading**: Ensures non-blocking scans using Python's `QThread`.

---

## Prerequisites

Ensure the following dependencies are installed:

1. **Python 3.8 or higher**
2. **scapy**: Used for ARP scanning.
3. **PySide6 or PyQt6**: For building the GUI.
4. **netifaces**: To retrieve network interface details.

## Requirements

- **Python 3.8+**
- **pipenv**: For managing the virtual environment and dependencies.
- **scapy**: For ARP scanning and packet manipulation.
- **PySide6**: For building the graphical user interface.
- **netifaces**: To retrieve network interface details.

---

## Installation

1. **Clone the repository**:

Clone the repository to your local machine:

```bash
git clone https://github.com/CyberRoute/phantom.git
cd arp-scanner
```

2. **Install the dependencies with Pipenv**:

Install `pipenv` if it's not already installed:
```bash
pip install pipenv
```
Then, use `pipenv` to create the virtual environment and install the required dependencies:
```bash
pipenv install
```
To activate the virtual environment:
```bash
pipenv shell
```
3. **Run the application**:
Run the ARP Scanner using the following command. You need to provide the network interface (like `eth0`, `wlan0`, or `wlp0s20f3`) for your system:
```bash
sudo pipenv run python3 main.py --interface <interface>
```
Example:
```bash
sudo pipenv run python3 main.py --interface wlp0s20f3
```
## Usage Instructions
1. **Start the Application**:
After running the application with the correct interface, the GUI will launch.
<div align="center">
<img src="/images/phan.png" width="800px"</img>
</div>
2. **Scanning the Network**:
- 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**:
- Click on any device in the list to open a detailed window that shows more information about that particular device.
5. **Stopping the Scan**:
- Press the **"Quit"** button to stop the ARP scan and close the application.
17 changes: 4 additions & 13 deletions core/arp_scanner.py
Original file line number Diff line number Diff line change
Expand Up @@ -106,22 +106,13 @@ def __init__(self, interface, oui_url, parent=None):
self._ui.list.setFont(font)
self._ui.listpkt.setFont(font)

# description_item_1 = QListWidgetItem("Devices detected")
# description_item_1.setBackground(QColor(Qt.darkGray))
# description_item_1.setForeground(QColor(Qt.white))
# description_item_2 = QListWidgetItem("ARP packets")
# description_item_2.setBackground(QColor(Qt.darkGray))
# description_item_2.setForeground(QColor(Qt.white))
# self._ui.list.addItem(description_item_1)
# self._ui.listpkt.addItem(description_item_2)

self.add_list_widget_to_tab_1()

self.packet_collector = sniffer.PacketCollector(self.interface, net.get_ip_address())
self.packet_collector.packetCaptured.connect(self.add_packet_to_list)

self.progress_label = QLabel("Progress: 0%")
self._ui.verticalLayout.addWidget(self.progress_label)
# self.progress_label = QLabel("Progress: 0%")
# self._ui.verticalLayout.addWidget(self.progress_label)

def add_list_widget_to_tab_1(self):
self.list_widget_tab7 = QListWidget()
Expand Down Expand Up @@ -304,7 +295,7 @@ def run(self):
hostname = ARPScanner.get_hostname(ip_address)
arp_results.append((ip_address, mac, hostname, vendor, packet[1][scapy.ARP]))

progress = int((i + 1) / len(arp_packets) * 100)
self.progress_updated.emit(progress)
# progress = int((i + 1) / len(arp_packets) * 100)
# self.progress_updated.emit(progress)
self.finished.emit(arp_results)

Binary file added images/phan.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 1207186

Please sign in to comment.