Skip to content

Commit 12ef565

Browse files
authored
feat: support bolt lua script parse mutil-port (#353)
1 parent 1e3d89d commit 12ef565

File tree

2 files changed

+22
-3
lines changed

2 files changed

+22
-3
lines changed

plugins/wireshark/README.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,3 +47,17 @@ For advanced usage, you can search for any property under the bolt protocol, suc
4747
```
4848
bolt.trace_id == 0bxxxx335162832343267634611586
4949
```
50+
51+
如果你想此 bolt 协议的解析脚本去解析更多的端口那么可以在此处添加更多的端口
52+
53+
If you want the bolt protocol parsing script to parse more ports then you can add more ports here
54+
55+
example:
56+
57+
```lua
58+
local ports = {12200, 12199, 12198}
59+
60+
for _, port in ipairs(ports) do
61+
DissectorTable.get("tcp.port"):add(port, bolt_protocol)
62+
end
63+
```

plugins/wireshark/bolt.lua

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -436,6 +436,11 @@ function get_status_name(statuscode)
436436
end
437437

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

0 commit comments

Comments
 (0)