tshark tcp port 80 or tcp port 443 -V -2 -R "http.request || http.response"
Showing posts with label wireshark. Show all posts
Showing posts with label wireshark. Show all posts
Feb 23, 2012
Wireshark
You can use the specific HTTP header display filters to show either just the request headers, just the response headers or both.
Run Wireshark as a Normal User on Ubuntu 11.10
Install everything you need:
sudo apt-get install wireshark tshark libcap2-bin
According to /usr/share/doc/wireshark/README.Debian you have to add your user to the group wireshark
# check group
cat /etc/group | grep wireshark
# create it if not exists
sudo groupadd wireshark
# add user to this new group
sudo usermod -a -G wireshark `whoami`
# check user groups
groups `whoami`
# yourusername : yourusergroup ..... wireshark
# or
cat /etc/group | grep wireshark
# wireshark:x:1002:yourusername
# log in to a new group
newgrp wireshark
Then lets add capture privileges http://wiki.wireshark.org/CaptureSetup/CapturePrivileges :
sudo chgrp wireshark /usr/bin/dumpcap
sudo chmod 754 /usr/bin/dumpcap
sudo setcap 'CAP_NET_RAW+eip CAP_NET_ADMIN+eip' /usr/bin/dumpcap
# ensure that everything ok:
getcap /usr/bin/dumpcap
# /usr/bin/dumpcap = cap_net_admin,cap_net_raw+eip
You shoud be able run tshark without sudo:
tshark -R 'ip.addr==178.159.244.20'
# amqp
tshark -i lo tcp port 5672
Jun 20, 2011
Watch what SQL queries Dango produces
from django.db import connection
print connection.queries
print connection.queries[-1]['sql']
Or in Django >= 1.3
import logging
l = logging.getLogger('django.db.backends')
l.setLevel(logging.DEBUG)
l.addHandler(logging.StreamHandler())
Using tshark
sudo tshark -Tfields -e mysql.query -i any -R 'mysql.query'
mysql -h 127.0.0.1 -u root -p
Subscribe to:
Posts (Atom)