Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to sniff packets on Mac OS 10.7 Lion? [closed]

Tags:

I'm developing a website that uses SSL (connction to https) and I want to confirm that all the data sent is encrypted. Could anyone give me a good free packet sniffer on Mac OS that I could use?

Thanks!

like image 493
Michael Eilers Smith Avatar asked Feb 17 '12 01:02

Michael Eilers Smith


People also ask

How do you sniff packets on a Mac?

Choose “Open Wireless Diagnostics” from the list to open the wi-fi utility. Ignore the splash screen and pull down the “Window” menu, choose “Sniffer” from the list of options in the Wireless Diagnostics menu. Select the Wi-Fi Channel and channel Width to sniff and capture packets for and click “Start”.

How do I open a PCAP file on a Mac?

Perhaps the easiest way to open, read, and interpret a . cap file is using the built-in tcpdump utility on a Mac or Linux machine. The file can be easily scanned, interpreted, read, moved around in, searched, or whatever else you're looking to do with it.


2 Answers

It's not as slick as Wireshark, but OS X has a built-in command line tool for capturing and displaying packets:

sudo tcpdump -A -s0 -ien0 port 80 

(the -A flag makes it display the packets' contents as text, -s0 makes it capture entire packets not just the headers, -ien0 makes it capture on the first ethernet interface (generally, the wireless is en1), and port 80 makes it only capture traffic to/from port 80 (see the man page for more options for capture patterns.)

like image 156
Gordon Davisson Avatar answered Oct 04 '22 21:10

Gordon Davisson


Don't forget Packet Peeper, WireShark is not so nice on Mac.

http://packetpeeper.org/

like image 39
AbiusX Avatar answered Oct 04 '22 22:10

AbiusX