Ask Your Question
0

tshark api to generate json from pcap

asked 2019-11-11 13:40:45 +0000

bf31415 gravatar image

For my use case, i need to derive and process the json output of pcaps. today, for each pcap, i run a new instance of tshark to generate the json for each pcap. this works but i'm looking to streamline this. Is there a tshark api/library that i can instead call where i pass tshark a pcap and get a json object back without having to fork/exec a tshark process?

thanks

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2019-11-11 13:58:06 +0000

grahamb gravatar image

Not really. The dissection engine is in libwireshark but the API is NOT designed for external users, although some brave souls have done so. The json output part is handled elsewhere.

There is another option, sharkd, unfortunately poorly documented, which provides access to dissection over a tcp connection using json and is the backend for webshark.

edit flag offensive delete link more

Your Answer

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

Add Answer

Question Tools

Stats

Asked: 2019-11-11 13:40:45 +0000

Seen: 422 times

Last updated: Nov 11 '19