Skip to content

Instantly share code, notes, and snippets.

@cjmakes
Last active November 10, 2021 00:29
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save cjmakes/2dab5291ba55135fe7375f44253527a3 to your computer and use it in GitHub Desktop.
Save cjmakes/2dab5291ba55135fe7375f44253527a3 to your computer and use it in GitHub Desktop.
FOU Lua dissector for wireshark
-- Implements FOU packet parsing in wireshark
-- Place this file at ~/.local/lib/wireshark/plugins/fou.lua
-- FOU: https://lwn.net/Articles/614348/
-- by conjones
fou_protocol = Proto("fou","Foo Over UDP Protocol")
function fou_protocol.dissector(buffer, pinfo, tree)
pinfo.cols.protocol = "FOU"
Dissector.get("ip"):call(buffer():tvb(), pinfo, tree)
end
-- register handler
udp_table = DissectorTable.get("udp.port")
-- register our protocol to handle udp port 7777
udp_table:add(7777,fou_protocol)
udp_table:add(7778,fou_protocol)
@robbat2
Copy link

robbat2 commented Nov 10, 2021

Thank you for this!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment