Skip to content

Add tshark packet analysis support - #45

Open
Dhineshkumar272005 wants to merge 2 commits into
Wh0am123:mainfrom
Dhineshkumar272005:main
Open

Add tshark packet analysis support#45
Dhineshkumar272005 wants to merge 2 commits into
Wh0am123:mainfrom
Dhineshkumar272005:main

Conversation

@Dhineshkumar272005

Copy link
Copy Markdown

Description

Adds TShark (Wireshark's CLI) as a new tool to the MCP Kali Server, enabling network packet capture and traffic analysis directly through the MCP agent.

Changes

  • server.py: Added /api/tools/tshark API endpoint
  • client.py: Added tshark_capture MCP tool registration

Supported Parameters

Parameter TShark Flag Description
interface -i Network interface to capture on (e.g., eth0, wlan0)
capture_filter -f BPF capture filter (e.g., "tcp port 80")
display_filter -Y Wireshark display filter (e.g., "http.request")
packet_count -c Number of packets to capture before stopping
duration -a duration:N Capture duration in seconds
read_file -r Read and analyze an existing pcap file
output_fields -T fields -e Comma-separated field extraction
additional_args Any extra TShark arguments

Use Cases

  • Live packet capture on a specific interface
  • Analyzing existing .pcap files from other tools
  • Filtering traffic by protocol, port, or IP
  • Extracting specific fields for structured output

Testing

Follows the same endpoint pattern and error handling as all existing tools (nmap, gobuster, nikto, etc.).

@Dhineshkumar272005 Dhineshkumar272005 changed the title feat: add tshark packet analysis support Add tshark packet analysis support Mar 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant