Skip to content

Commit

Permalink
Support Unicode strings in the Wireshark plugin
Browse files Browse the repository at this point in the history
Closes #435
  • Loading branch information
emanuele-f committed May 23, 2024
1 parent 28aeae7 commit 0351e7b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tools/pcapdroid.lua
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ local fields = {}

fields.magic = ProtoField.uint32("pcapdroid.magic", "Magic", base.HEX)
fields.uid = ProtoField.int32("pcapdroid.uid", "UID", base.DEC)
fields.appname = ProtoField.string("pcapdroid.appname", "App name", base.ASCII)
fields.appname = ProtoField.string("pcapdroid.appname", "App name", base.UNICODE)

pcapdroid.fields = fields

Expand All @@ -51,7 +51,7 @@ function pcapdroid.dissector(buffer, pinfo, tree)
return
end

local appname = trailer(8, 20):string()
local appname = trailer(8, 20):raw()
local subtree = tree:add(pcapdroid, buffer(), string.format("PCAPdroid, App: %s", appname))

subtree:add(fields.magic, trailer(0, 4))
Expand Down

0 comments on commit 0351e7b

Please sign in to comment.