November 2017
Intermediate to advanced
226 pages
5h 59m
English
Lets try PyShark with some examples. Make sure to install TShark in your system.
>>> import pyshark
>>> cap = pyshark.FileCapture('sample.pcap')
We can sniff from a live interface with the following commands:
>>> cap = pyshark.LiveCapture(interface='wlp3s0b1')
>>> cap.sniff(timeout=3)
This will sniff the interface for the next 3 seconds
To print out the first packet details, we can use the ...
Read now
Unlock full access