This system is a network port traffic monitoring tool based on Python and PyQt5. It can capture and analyze network packets in real-time, providing detailed traffic statistics and visual reports.
- Real-time Capture: Capable of capturing network packets in real-time and performing real-time analysis.
- Traffic Statistics: Provides detailed traffic statistics, including packet count, traffic size, etc.
- Visual Reports: Generates detailed traffic statistics reports and provides visual charts for display.
- User-friendly Interface: Developed using PyQt5, the interface is simple, intuitive, and easy to operate.
-
Install Dependencies: Using
pip:pip install -r requirements.txt
Or using
conda:conda install --file requirements.txt
-
Run the Program: On macOS, you need to run the program with
sudoprivileges:sudo python main.py
On Windows, run the program directly:
python main.py
In order to use the database, you need to configure the database first.
- The system uses MySQL for data persistence and historical analysis
- Create a new MySQL database and execute the following SQL:
CREATE TABLE capture_sessions (
id INT AUTO_INCREMENT PRIMARY KEY,
start_time DATETIME,
end_time DATETIME
);
CREATE TABLE packets (
id INT AUTO_INCREMENT PRIMARY KEY,
session_id INT,
packet_data JSON,
capture_time DATETIME,
FOREIGN KEY (session_id) REFERENCES capture_sessions(id)
);- Access database settings through the toolbar settings icon
- Configure the following parameters:
- Host: MySQL server address
- Port: MySQL server port (default 3306)
- Database: Database name
- Username: MySQL username
- Password: MySQL password
-
Data Persistence
- Automatically saves captured packet information
- Stores detailed packet metadata in JSON format
- Maintains capture session history
-
Historical Analysis
- View historical traffic patterns
- Generate traffic statistics by time period
- Compare traffic across different capture sessions
-
Data Security
- Encrypted database credentials storage
- Secure connection handling
- Password protection for sensitive data
-
View Historical Data
- Click the "Historical Chart" button in the toolbar
- Select date range for analysis
- Choose specific processes or view all traffic
-
Export Data
- Export captured data to CSV/JSON format
- Generate custom reports from historical data
- Backup capture sessions for later analysis
- Administrator privileges are required to capture network packets.
Feel free to contact us:
- Email: z404878860@163.com




