Skip to content

Commit e92dbe1

Browse files
committed
v0.5.0
1 parent 43c9487 commit e92dbe1

47 files changed

Lines changed: 3895 additions & 565 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.dockerignore

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
.git
2+
.github
3+
.venv
4+
.mypy_cache
5+
.pytest_cache
6+
.coverage
7+
htmlcov
8+
__pycache__
9+
*.py[oc]
10+
*.egg-info
11+
build
12+
dist
13+
wheels
14+
tests
15+
spec
16+
uv.lock
17+
*.pcap
18+
*.pcapng
19+
Logo.png
20+
CLAUDE.md
Lines changed: 87 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,87 @@
1+
name: Bug Report
2+
description: Report a bug or unexpected behavior
3+
labels: ["bug"]
4+
body:
5+
- type: markdown
6+
attributes:
7+
value: |
8+
Thanks for taking the time to file a bug report! Please fill out the information below to help us diagnose the issue.
9+
10+
- type: textarea
11+
id: description
12+
attributes:
13+
label: Bug Description
14+
description: A clear and concise description of what the bug is.
15+
placeholder: Describe the bug...
16+
validations:
17+
required: true
18+
19+
- type: textarea
20+
id: reproduce
21+
attributes:
22+
label: Steps to Reproduce
23+
description: Steps to reproduce the behavior.
24+
placeholder: |
25+
1. Call tool `wireshark_get_packet_list` with file `...`
26+
2. Set parameter `...` to `...`
27+
3. See error
28+
validations:
29+
required: true
30+
31+
- type: textarea
32+
id: expected
33+
attributes:
34+
label: Expected Behavior
35+
description: What did you expect to happen?
36+
validations:
37+
required: true
38+
39+
- type: textarea
40+
id: actual
41+
attributes:
42+
label: Actual Behavior
43+
description: What actually happened? Include full error messages if applicable.
44+
validations:
45+
required: true
46+
47+
- type: input
48+
id: version
49+
attributes:
50+
label: Wireshark MCP Version
51+
placeholder: e.g., 0.4.0
52+
validations:
53+
required: true
54+
55+
- type: input
56+
id: tshark_version
57+
attributes:
58+
label: TShark Version
59+
description: Run `tshark --version` and paste the first line.
60+
placeholder: e.g., TShark (Wireshark) 4.2.3
61+
validations:
62+
required: true
63+
64+
- type: input
65+
id: python_version
66+
attributes:
67+
label: Python Version
68+
placeholder: e.g., 3.11.4
69+
validations:
70+
required: true
71+
72+
- type: dropdown
73+
id: os
74+
attributes:
75+
label: Operating System
76+
options:
77+
- macOS
78+
- Linux
79+
- Windows
80+
validations:
81+
required: true
82+
83+
- type: textarea
84+
id: context
85+
attributes:
86+
label: Additional Context
87+
description: Any other context, logs, or screenshots that might help.
Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
name: Feature Request
2+
description: Suggest a new tool or improvement
3+
labels: ["enhancement"]
4+
body:
5+
- type: markdown
6+
attributes:
7+
value: |
8+
Have an idea for a new tool or improvement? We'd love to hear it!
9+
10+
- type: textarea
11+
id: problem
12+
attributes:
13+
label: Problem / Motivation
14+
description: What problem does this feature solve? What use case does it address?
15+
placeholder: I'm trying to do X, but currently there's no way to...
16+
validations:
17+
required: true
18+
19+
- type: textarea
20+
id: solution
21+
attributes:
22+
label: Proposed Solution
23+
description: Describe the feature or tool you'd like to see added.
24+
placeholder: |
25+
A new tool `wireshark_xxx` that accepts...
26+
It should return...
27+
validations:
28+
required: true
29+
30+
- type: textarea
31+
id: tshark_command
32+
attributes:
33+
label: Relevant TShark Command (if known)
34+
description: If you know the underlying `tshark` command that would implement this, paste it here.
35+
placeholder: tshark -r file.pcap -T fields -e ...
36+
37+
- type: textarea
38+
id: alternatives
39+
attributes:
40+
label: Alternatives Considered
41+
description: Any alternative approaches or workarounds you've tried?
42+
43+
- type: textarea
44+
id: context
45+
attributes:
46+
label: Additional Context
47+
description: Any other context, examples, or references.

.github/dependabot.yml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
version: 2
2+
updates:
3+
- package-ecosystem: "pip"
4+
directory: "/"
5+
schedule:
6+
interval: "weekly"
7+
day: "monday"
8+
labels:
9+
- "dependencies"
10+
open-pull-requests-limit: 5
11+
12+
- package-ecosystem: "github-actions"
13+
directory: "/"
14+
schedule:
15+
interval: "monthly"
16+
labels:
17+
- "dependencies"
18+
- "ci"
19+
open-pull-requests-limit: 5

.github/pull_request_template.md

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
## Summary
2+
3+
<!-- What does this PR do? 1-2 sentences. -->
4+
5+
## Type of Change
6+
7+
- [ ] Bug fix
8+
- [ ] New feature / tool
9+
- [ ] Enhancement to existing tool
10+
- [ ] Documentation update
11+
- [ ] CI/tooling change
12+
- [ ] Refactoring (no functional change)
13+
14+
## Changes
15+
16+
<!-- List the key changes made. -->
17+
18+
-
19+
20+
## Testing
21+
22+
<!-- Describe how you tested this. -->
23+
24+
- [ ] Added/updated tests in `tests/`
25+
- [ ] All tests pass (`pytest tests/`)
26+
- [ ] Linting passes (`ruff check src/`)
27+
- [ ] Manually tested with a real pcap file
28+
29+
## Spec / Change Record
30+
31+
<!-- If this is a code change, have you added a record under spec/changes/? -->
32+
33+
- [ ] Added `spec/changes/YYYY-MM-DD-short-topic.md`
34+
- [ ] N/A (docs/CI only)
35+
36+
## Documentation
37+
38+
- [ ] Updated `README.md`
39+
- [ ] Updated `README_zh.md`
40+
- [ ] Updated `CHANGELOG.md` (under `[Unreleased]`)
41+
- [ ] N/A

.github/workflows/ci.yml

Lines changed: 35 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -7,33 +7,58 @@ on:
77
branches: [ "master", "main" ]
88

99
jobs:
10+
lint:
11+
runs-on: ubuntu-latest
12+
steps:
13+
- uses: actions/checkout@v4
14+
15+
- name: Set up Python
16+
uses: actions/setup-python@v5
17+
with:
18+
python-version: "3.12"
19+
20+
- name: Install dev dependencies
21+
run: |
22+
python -m pip install --upgrade pip
23+
pip install .[dev]
24+
25+
- name: Ruff lint
26+
run: ruff check src/ tests/
27+
28+
- name: Ruff format check
29+
run: ruff format --check src/ tests/
30+
31+
- name: Type check
32+
run: mypy src/wireshark_mcp/ --ignore-missing-imports
33+
1034
test:
1135
runs-on: ubuntu-latest
1236
strategy:
1337
matrix:
14-
python-version: ["3.10", "3.11", "3.12"]
38+
python-version: ["3.10", "3.11", "3.12", "3.13"]
1539

1640
steps:
1741
- uses: actions/checkout@v4
18-
42+
1943
- name: Set up Python ${{ matrix.python-version }}
2044
uses: actions/setup-python@v5
2145
with:
2246
python-version: ${{ matrix.python-version }}
23-
47+
2448
- name: Install dependencies
2549
run: |
2650
python -m pip install --upgrade pip
27-
pip install .
28-
pip install pytest pytest-asyncio
29-
51+
pip install .[dev]
52+
3053
- name: Install TShark
3154
run: |
3255
sudo apt-get update
3356
sudo apt-get install -y tshark
34-
# Fix permissions (non-interactive)
3557
sudo usermod -aG wireshark $USER
36-
37-
- name: Run tests
58+
59+
- name: Run tests with coverage
3860
run: |
39-
pytest tests/
61+
pytest tests/ --cov=wireshark_mcp --cov-report=term-missing -v
62+
63+
- name: Compile check
64+
run: python -m compileall src/

.gitignore

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,3 +8,17 @@ wheels/
88

99
# Virtual environments
1010
.venv
11+
12+
# Type checking
13+
.mypy_cache/
14+
15+
# Test / coverage
16+
htmlcov/
17+
.coverage
18+
.pytest_cache/
19+
20+
# Runtime caches
21+
urlhaus_cache.txt
22+
23+
# Spec (internal)
24+
spec/

CHANGELOG.md

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
# Changelog
2+
3+
All notable changes to this project will be documented in this file.
4+
5+
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
6+
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7+
8+
## [Unreleased]
9+
10+
## [0.4.0] - 2025-06-01
11+
12+
### Added
13+
- `wireshark_get_packet_bytes`: Get raw Hex/ASCII dump (Packet Bytes view)
14+
- `wireshark_get_packet_context`: View packets surrounding a specific frame (before and after) to understand context
15+
- `wireshark_search_packets` enhanced with `scope` parameter:
16+
- `scope="bytes"`: Search in raw payload (Hex/String)
17+
- `scope="details"`: Search in decoded text/fields with Regex support
18+
- `wireshark_follow_stream` now supports pagination (`offset_lines`) and content search (`search_content`)
19+
20+
### Changed
21+
- `wireshark_get_packet_list` now supports custom columns (e.g., `"ip.src,http.host"`)
22+
- `wireshark_get_packet_details` now supports layer filtering (e.g., `"ip,tcp,http"`) to reduce token usage
23+
24+
### Deprecated
25+
- `wireshark_read_packets`: Use `wireshark_get_packet_details` instead
26+
27+
## [0.2.1] - 2025-05-01
28+
29+
### Added
30+
- Initial public release
31+
- Core packet analysis tools: `wireshark_get_packet_list`, `wireshark_get_packet_details`, `wireshark_follow_stream`
32+
- Data extraction: `wireshark_extract_fields`, `wireshark_extract_http_requests`, `wireshark_extract_dns_queries`, `wireshark_list_ips`, `wireshark_export_objects`
33+
- Statistics: protocol hierarchy, endpoints, conversations, I/O graph, expert info, service response time
34+
- File operations: `wireshark_get_file_info`, `wireshark_merge_pcaps`, `wireshark_filter_save`
35+
- Live capture: `wireshark_list_interfaces`, `wireshark_capture`
36+
- Security: `wireshark_check_threats` (URLhaus), `wireshark_extract_credentials`
37+
- Decoding: `wireshark_decode_payload` with auto-detection (Base64, Hex, URL, Gzip, Deflate, Rot13)
38+
- Visualization: ASCII traffic plot, ASCII protocol hierarchy tree
39+
40+
[Unreleased]: https://github.com/bx33661/Wireshark-MCP/compare/v0.4.0...HEAD
41+
[0.4.0]: https://github.com/bx33661/Wireshark-MCP/compare/v0.2.1...v0.4.0
42+
[0.2.1]: https://github.com/bx33661/Wireshark-MCP/releases/tag/v0.2.1

CLAUDE.md

Lines changed: 0 additions & 19 deletions
This file was deleted.

0 commit comments

Comments
 (0)