Search code examples
sqloraclewiresharkpacket-capturetns

How to export printable text only(or any other packet property) in wireshark


Long story short - I'm capturing SQLs from vendor tool to Oracle database by using Wireshark. It already has decoder for TNS protocol (which is great) and I can access text of SQL by

Right Click->Copy->Bytes(Printable Text Only). 

The problem is that there are tons of packets and doing right-click on each of them could take ages. I was wondering if there any way to export 'Printable Text Only' right from Wireshark. Ideally I want to have a text file with statements.

Any help will be highly appreciated.


Solution

  • I don't know how to do it with TNS. but you can do something like this using tshark, for example to look at http requests.

    tshark -T fields -e http.request.uri

    So if you can look at the options in the TNS decoder, you should be able to grab that field and redirect the output to a file.