1.窃取Email认证
1.1创建一个简单的嗅探器,捕获一个数据包,packet.show()函数解析了其中的协议信息并输出了包的内容。
from scapy.all import *
def packet_callbacke(packet):
print packet.show()
sniff(prn=packet_callbacke,count=1)
得到
python mail.py
WARNING: No route found for IPv6 destination :: (no default route?)
###[ Ethernet ]###
dst = c4:ca:d9:a8:cf:58
src = 60:eb:69:15:76:5f
type = 0x800
###[ IP ]###
version = 4L
ihl = 5L
tos = 0x0
len = 52
id = 6428
flags = DF
frag = 0L
ttl = 64
proto = tcp
chksum = 0xbacf
src = 10.21.21.120
dst = 115.239.211.92
\options \
###[ TCP ]###
sport = 33038
dport = http
seq = 2801454030
ack = 0
dataofs = 8L
reserved = 0L
flags = S
window = 8192
chksum = 0xf415
urgptr = 0
options = [('MSS', 1460