-
Notifications
You must be signed in to change notification settings - Fork 251
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
Garbage characters in PCAPdtoid trailer app name #435
Comments
I have the same problem here. It seems that because these ASCII encodings correspond to Chinese characters, there is an issue with the display. Is there a way to make the Lua script support decoding to UTF-8? |
@emanuele-f |
@Qpp0 please try this other change, other than diff --git a/tools/pcapdroid.lua b/tools/pcapdroid.lua
index 0cb2c52a..c0127cbf 100644
--- a/tools/pcapdroid.lua
+++ b/tools/pcapdroid.lua
@@ -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
@@ -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)) |
Problem solved! |
Thanks for confirming |
See #428 (comment)
The text was updated successfully, but these errors were encountered: