tcpdump and wireshark

tcpdump and wireshark

Capture traffic in a file using tcpdump:

$ sudo tcpdump -i any -w /tmp/xxx.dmp -s 0 host localhost and port 8080


$ sudo tcpdump -i any -w /tmp/xxx.dmp -s 0 net 127.0.0.1 and port 8080



View traffic from dump file using wireshark:

$ wireshark -r /tmp/xxx.dmp


Optionaly apply filter in wireshark as "http"

Click on a Http request

On the bottom pane, right click on "eXtensible Markup Language" -> Copy -> Bytes -> Printable Text Only

Paste the text in clipboard into a text editor

Comments

Popular posts from this blog

JSON with curl and jq

Import self signed in Linux for Chrome / Chromium headless testing

Colima - Drop In replacement for Docker Desktop for Mac and Linux