Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: support bolt lua script parse mutil-port #353

Merged
merged 1 commit into from
Jun 27, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions plugins/wireshark/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,3 +47,17 @@ For advanced usage, you can search for any property under the bolt protocol, suc
```
bolt.trace_id == 0bxxxx335162832343267634611586
```

如果你想此 bolt 协议的解析脚本去解析更多的端口那么可以在此处添加更多的端口

If you want the bolt protocol parsing script to parse more ports then you can add more ports here

example:

```lua
local ports = {12200, 12199, 12198}

for _, port in ipairs(ports) do
DissectorTable.get("tcp.port"):add(port, bolt_protocol)
end
```
11 changes: 8 additions & 3 deletions plugins/wireshark/bolt.lua
Original file line number Diff line number Diff line change
Expand Up @@ -436,6 +436,11 @@ function get_status_name(statuscode)
end

-- register our dissector upon tcp port 12200 (default)
bolt_protocol.prefs.port = Pref.uint("Bolt TCP port", 12200)
local tcp_port = DissectorTable.get("tcp.port")
tcp_port:add(bolt_protocol.prefs.port, bolt_protocol)
local ports = {12200}
-- 如果你想此 bolt 协议的解析脚本去解析更多的端口那么可以在此处添加更多的端口
-- If you want the bolt protocol parsing script to parse more ports then you can add more ports here
-- like: local ports = {12200, 12199, 12198}

for _, port in ipairs(ports) do
DissectorTable.get("tcp.port"):add(port, bolt_protocol)
end
Loading