scapy rdpcap

Scapy - rdpcap

样包:http://packetlife.net/captures/HTTP.cap

Scapyrdpcap主要用于读取数据包.官方说明如下:

Help on function rdpcap in modulescapy.utils:


rdpcap(filename, count=-1)

Read a pcap file and return apacket list

count: read only packets


>>> http = rdpcap('/root/HTTP.cap')
>>> http.summary()
Ether / IP / TCP 192.168.1.140:57678 > 174.143.213.184:http S
Ether / IP / TCP 174.143.213.184:http > 192.168.1.140:57678 SA
Ether / IP / TCP 192.168.1.140:57678 > 174.143.213.184:http A
Ether / IP / TCP 192.168.1.140:57678 > 174.143.213.184:http PA / Raw
Ether / IP / TCP 174.143.213.184:http > 192.168.1.140:57678 A
Ether / IP / TCP 174.143.213.184:http > 192.168.1.140:57678 A / Raw
Ether / IP / TCP 192.168.1.140:57678 > 174.143.213.184:http A
Ether / IP / TCP 174.143.213.184:http > 192.168.1.140:57678 A / Raw
Ether / IP / TCP 192.168.1.140:57678 > 174.143.213.184:http A
Ether / IP / TCP 174.143.213.184:http > 192.168.1.140:57678 A / Raw
Ether / IP / TCP 192.168.1.140:57678 > 174.143.213.184:http A
Ether / IP / TCP 174.143.213.184:http > 192.168.1.140:57678 A / Raw
Ether / IP / TCP 192.168.1.140:57678 > 174.143.213.184:http A
Ether / IP / TCP 174.143.213.184:http > 192.168.1.140:57678 A / Raw
Ether / IP / TCP 192.168.1.140:57678 > 174.143.213.184:http A
Ether / IP / TCP 174.143.213.184:http > 192.168.1.140:57678 A / Raw
Ether / IP / TCP 192.168.1.140:57678 > 174.143.213.184:http A
Ether / IP / TCP 174.143.213.184:http > 192.168.1.140:57678 A / Raw
Ether / IP / TCP 192.168.1.140:57678 > 174.143.213.184:http A
Ether / IP / TCP 174.143.213.184:http > 192.168.1.140:57678 A / Raw
Ether / IP / TCP 192.168.1.140:57678 > 174.143.213.184:http A
Ether / IP / TCP 174.143.213.184:http > 192.168.1.140:57678 A / Raw
Ether / IP / TCP 192.168.1.140:57678 > 174.143.213.184:http A
Ether / IP / TCP 174.143.213.184:http > 192.168.1.140:57678 A / Raw
Ether / IP / TCP 192.168.1.140:57678 > 174.143.213.184:http A
Ether / IP / TCP 174.143.213.184:http > 192.168.1.140:57678 PA / Raw
Ether / IP / TCP 192.168.1.140:57678 > 174.143.213.184:http A
Ether / IP / TCP 174.143.213.184:http > 192.168.1.140:57678 A / Raw
Ether / IP / TCP 192.168.1.140:57678 > 174.143.213.184:http A
Ether / IP / TCP 174.143.213.184:http > 192.168.1.140:57678 A / Raw
Ether / IP / TCP 192.168.1.140:57678 > 174.143.213.184:http A
Ether / IP / TCP 174.143.213.184:http > 192.168.1.140:57678 A / Raw
Ether / IP / TCP 192.168.1.140:57678 > 174.143.213.184:http A
Ether / IP / TCP 174.143.213.184:http > 192.168.1.140:57678 A / Raw
Ether / IP / TCP 192.168.1.140:57678 > 174.143.213.184:http A
Ether / IP / TCP 174.143.213.184:http > 192.168.1.140:57678 PA / Raw
Ether / IP / TCP 192.168.1.140:57678 > 174.143.213.184:http A
Ether / IP / TCP 192.168.1.140:57678 > 174.143.213.184:http FA
Ether / IP / TCP 174.143.213.184:http > 192.168.1.140:57678 FA
Ether / IP / TCP 192.168.1.140:57678 > 174.143.213.184:http A


>>> p = http[3]

>>> p

>>>


你可能感兴趣的:(Information,Gathering,Pentesting,Forensics,Protocols,Vulnerability,Analysis,python)