wireshark-mcp-server.cpython-310.pyc•14.9 kB
o
��UhbN � @ s d Z ddlZddlZddlZddlZddlZddlZddlZddlm Z ddl
mZ ddlm
Z
mZmZmZmZ zddlmZ W n eyQ ed� ed� Y nw ejejd d
� e�e�ZG dd� d�ZG d
d� d�ZG dd� d�Zdd� Zedkr�e� dS dS )z�
Wireshark MCP Server
A Model Context Protocol server that provides AI assistants with access to
Wireshark network analysis capabilities for network troubleshooting and analysis.
Author: AI Assistant
Date: 2025-06-20
� N)�ThreadPoolExecutor)�Path)�Dict�Any�List�Optional�Union)�FastMCPz8FastMCP not installed. Install with: pip install fastmcp� z4%(asctime)s - %(name)s - %(levelname)s - %(message)s)�level�formatc @ sj e Zd ZdZg d�ZdZdZdZede de
fdd ��Zed
e de
fdd��Zed
e de
e fdd��ZdS )�SecurityValidatorz>Security validation utilities for network analysis operations.)z6^(eth|wlan|lo|en|enp|wlp|docker|br-)[a-zA-Z0-9]{1,15}$z^Ethernet \d+$z^Wi-Fi \d*$z^Local Area Connection \d*$z^\d+$i, i'