This is a Description of my Project Where I Developed Two projects under the One Domain of Network Sniffing:
This Python script is designed to monitor HTTP traffic on a network interface using Scapy. It captures details such as protocol (TCP/UDP), IP addresses, ports, HTTP methods, paths, form data, and user-agent information. The captured requests are displayed in a structured table format, highlighting critical details for each request, including browser information and submitted form data.
Create a script to capture HTTP requests from the specified website without permission.
- Real-time Monitoring: Captures and displays HTTP requests and responses in real-time.
- Detailed Analysis: Provides comprehensive details like protocol types, IP addresses, ports, and HTTP header contents.
- User-Agent Parsing: Extracts and interprets browser and operating system information from user-agent strings.
- Form Data Extraction: Decodes and presents form submissions sent via HTTP POST requests.
- Customizable Filtering: Allows filtering of specific network traffic patterns for focused monitoring.
- Python 3.x
- Scapy
- PrettyTable
- user_agents
- Run the script (
python networksniff.py
). - Observe HTTP traffic on the specified network interface.
- Terminate monitoring by pressing Ctrl+C.
🔍 HTTP Request Capturing Script
🌐 Website: "http://testphp.vulnweb.com/login.php"
🖥️ Supported Platforms: Windows VS Code Editor
📝 Objective: Create a script to capture HTTP requests from the specified website without permission.
-
Install Python:
- Make sure Python 3.x is installed on your system. If not, download it from python.org and follow the installation prompts.
-
Install Required Python Packages:
- Open your terminal or command prompt.
- Use
pip
, Python's package installer, to install the necessary packages:pip install pyyaml ua-parser user-agents scapy prettytable
- Explanation of Packages:
scapy
: Allows manipulation and capturing of network packets.prettytable
: Facilitates the creation of formatted tables for displaying captured data.user_agents
: Parses user-agent strings to extract browser and operating system information.
-
Clone the Repository:
- If you haven't already, clone or download the repository from GitHub where your script (
networksniff.py
) is hosted.
- If you haven't already, clone or download the repository from GitHub where your script (
-
Navigate to the Directory:
- Open a terminal or command prompt.
- Change directory (
cd
) into the repository directory wherenetworksniff.py
is located.
-
Run the Script:
- Execute the script using Python:
python networksniff.py
- Replace
networksniff.py
with the actual filename of your script.
- Execute the script using Python:
-
Capturing Network Packets:
- Once the script starts running, it will begin capturing HTTP requests made from your network interface.
- Each captured HTTP request is parsed and displayed in a structured table format.
-
Stopping the Script:
- To stop capturing packets, press
Ctrl+C
in the terminal or command prompt where the script is running. - This action terminates the script execution and stops further packet capture.
- To stop capturing packets, press
- Upon running
networksniff.py
, the script displays a banner using ASCII art. - It listens and captures HTTP requests in real-time.
- Each captured HTTP request includes details such as timestamp, protocol (TCP/UDP), IP addresses, ports, HTTP method, path, website, browser info, and form data (if applicable) in a neatly formatted table.
- Permissions: Ensure your environment has the necessary permissions to capture network packets. Administrative privileges might be required, depending on your operating system.
- Python Based Network Sniffer Tool :
networksniff.py
- Web Based Network Sniffer Tool :
Web_based_Sniffer_Tool.php
Check out the project on GitHub for detailed documentation, issues, and contributions.
Enhance your network monitoring capabilities with CodeAlpha Project's Network Sniffing tool! Feel free to customize and expand this README.md further to showcase more details, screenshots, or additional features of your project.