python - tcpdump to only print urls -


is there way do

tcpdump -i lo -a  

and have print urls, connections made?

i have done:

sudo tcpdump -i lo -a | grep host:  

which works great. wondering if there options same in tcpdump

finally, there way in python without using sys command or popen/subprocess

you can use scapy sniff function , use regex or grep

import scapy tcpdump = sniff(count=5,filter="host 64.233.167.99",prn=lambda x:x.summary()) print tcpdump 

change filter filter text :)

or maybe want save traffic , see in wireshark

wrpcap("temp.cap",pkts) 

Comments

Popular posts from this blog

php - Calling a template part from a post -

Firefox SVG shape not printing when it has stroke -

How to mention the localhost in android -