1. Install Gnuplot from Ubuntu: http://blog.163.com/gz_ricky/blog/static/182049118201362501316961/
Process is
NumPy, X11, Gnuplot->gnuplotpy
The approximate order is
sudo apt - Get Install Python - NumPy python - scipy python - matplotlib Ipython Ipython - Notebook python - Pandas Python - SymPy python - Nose
sudo apt - Get Install gnuplot - X11
sudo apt - Get Install libx11 - Dev Libxt - Dev Libreadline - GPLv2 - Dev GLib - 2.0
CD ~ /downloads/ gnuplot - 4.6 . 3 /
./ Configure
Make
sudo make install
CD gnuplot - py - 1.8 /
python setup.py install
2. Install pyx
sudo pip install pyx==0.12.1
3. Install scapy
Pip install scapy
Two. scapy
Reference Document http://www.secdev.org/projects/scapy/doc/usage.html
Main functions:
Send, Sr, SR1, Sniff, Rdpcap, meke_table,
Sr (IP (dst= "192.168.1.1")/tcp (Sport=randshort (), dport=[440,441,442,443],flags= "S"))
Ans,unans = SR (IP (dst=["192.168.1.1", "yahoo.com", "slashdot.org"])/tcp (dport=[22,80,443],flags= "S"))
ans.summay, Ans.filter,
a=rdpcap ("/spare/captures/isakmp.cap")
sniff (iface= " Wifi0 ", filter= ' ICMP and Host 1.1.1.1 ', Prn=lambda x:x.summary ()) #x. Show
pkts = Sniff ( Prn=lambda x:x.sprintf ("{ip:%ip.src%-%ip.dst%\n}{raw:%raw.load%\n}")
& nbsp p = Sniff (iface= "Wifi0", filter= ' TCP and Host 1.1.1.1 ', count=1)
p.show ()
p[0]
 P[0].SRC, P[0].DST,
This article is from the "9523704" blog, please be sure to keep this source http://9533704.blog.51cto.com/9523704/1773277
Python Scapy Learning Notes