Ask Your Question
0

how to get "protobuf search paths" in lua

asked 2023-10-10 15:20:07 +0000

navahoo gravatar image

updated 2023-10-10 16:01:53 +0000

Chuckc gravatar image

when to use wireshark protobuf decode capablity, user need to configure "protobuf serach paths" in menu[Wireshark->Preferences->Protocols->Protobuf->"protobuf serach paths" Edit]

so how to get "protobuf serach paths" in lua

edit retag flag offensive close merge delete

Comments

How will you use the search paths?

Chuckc gravatar imageChuckc ( 2023-10-10 16:30:38 +0000 )edit

I want to use lua to open some file under this folder("protobuf serach paths" ) and then read/write

navahoo gravatar imagenavahoo ( 2023-10-11 01:29:02 +0000 )edit

11.6. Configuration Profiles

Protobuf Search Paths (protobuf_search_paths) (Section 11.21, “Protobuf Search Paths”)


The UAT file can be part of a profile and I don't know a way to determine what the current profile is.

Chuckc gravatar imageChuckc ( 2023-10-11 02:01:30 +0000 )edit

what does UAT mean?

navahoo gravatar imagenavahoo ( 2023-10-11 08:20:52 +0000 )edit

epan/uat.c:

 *  uat.c
 *
 *  User Accessible Tables
 *  Maintain an array of user accessible data structures

Probably not a proper analogy but I think of them as config files that the user can update in the Wireshark gui.
I'm going to open an enhancement request to get access to current profile from lua. Will add a link to it here when complete.

Chuckc gravatar imageChuckc ( 2023-10-11 13:52:44 +0000 )edit

1 Answer

Sort by » oldest newest most voted
0

answered 2023-10-11 15:47:19 +0000

Chuckc gravatar image
edit flag offensive delete link more

Comments

Beside wait this enhancement, is it possible to give a demo , how to use lua scipt to add GUI to let user to input: 1. enable protobuf decoding 2. choose files which used for customized protobuf decoding

navahoo gravatar imagenavahoo ( 2023-10-12 14:53:50 +0000 )edit

Does plugin complied by C can get "protobuf serach paths" ?

navahoo gravatar imagenavahoo ( 2023-10-12 14:55:36 +0000 )edit

epan/dissectors/packet-protobuf.c:

        /* load all .proto files in the marked search paths, we can invoke FindMethodByName etc later. */
Chuckc gravatar imageChuckc ( 2023-10-12 15:46:56 +0000 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2023-10-10 15:20:07 +0000

Seen: 171 times

Last updated: Oct 11 '23