python无法初始化设备prn_使用 — Scapy 2.4.4 文档

>>> sniff(filter="icmp and host 66.35.250.151", count=2)

>>> a=_

>>> a.nsummary()

0000 Ether / IP / ICMP 192.168.5.21 echo-request 0 / Raw

0001 Ether / IP / ICMP 192.168.5.21 echo-request 0 / Raw

>>> a[1]

ihl=5L tos=0x0 len=84 id=0 flags=DF frag=0L ttl=64 proto=ICMP chksum=0x3831

src=192.168.5.21 dst=66.35.250.151 options='' |

chksum=0x6571 id=0x8745 seq=0x0 |>>>

>>>sniff(iface="wifi0", prn=lambda x: x.summary())

802.11 Management 8 ff:ff:ff:ff:ff:ff / 802.11 Beacon / Info SSID / Info Rates / Info DSset / Info TIM / Info 133

802.11 Management 4 ff:ff:ff:ff:ff:ff / 802.11 Probe Request / Info SSID / Info Rates

802.11 Management 5 00:0a:41:ee:a5:50 / 802.11 Probe Response / Info SSID / Info Rates / Info DSset / Info 133

802.11 Management 4 ff:ff:ff:ff:ff:ff / 802.11 Probe Request / Info SSID / Info Rates

802.11 Management 4 ff:ff:ff:ff:ff:ff / 802.11 Probe Request / Info SSID / Info Rates

802.11 Management 8 ff:ff:ff:ff:ff:ff / 802.11 Beacon / Info SSID / Info Rates / Info DSset / Info TIM / Info 133

802.11 Management 11 00:07:50:d6:44:3f / 802.11 Authentication

802.11 Management 11 00:0a:41:ee:a5:50 / 802.11 Authentication

802.11 Management 0 00:07:50:d6:44:3f / 802.11 Association Request / Info SSID / Info Rates / Info 133 / Info 149

802.11 Management 1 00:0a:41:ee:a5:50 / 802.11 Association Response / Info Rates / Info 133 / Info 149

802.11 Management 8 ff:ff:ff:ff:ff:ff / 802.11 Beacon / Info SSID / Info Rates / Info DSset / Info TIM / Info 133

802.11 Management 8 ff:ff:ff:ff:ff:ff / 802.11 Beacon / Info SSID / Info Rates / Info DSset / Info TIM / Info 133

802.11 / LLC / SNAP / ARP who has 172.20.70.172 says 172.20.70.171 / Padding

802.11 / LLC / SNAP / ARP is at 00:0a:b7:4b:9c:dd says 172.20.70.172 / Padding

802.11 / LLC / SNAP / IP / ICMP echo-request 0 / Raw

802.11 / LLC / SNAP / IP / ICMP echo-reply 0 / Raw

>>>sniff(iface="eth1", prn=lambda x: x.show())

---[ Ethernet ]---

dst = 00:ae:f3:52:aa:d1

src = 00:02:15:37:a2:44

type = 0x800

---[ IP ]---

version = 4L

ihl = 5L

tos = 0x0

len = 84

id = 0

flags = DF

frag = 0L

ttl = 64

proto = ICMP

chksum = 0x3831

src = 192.168.5.21

dst = 66.35.250.151

options = ''

---[ ICMP ]---

type = echo-request

code = 0

chksum = 0x89d9

id = 0xc245

seq = 0x0

---[ Raw ]---

load = 'B\xf7i\xa9\x00\x04\x149\x08\t\n\x0b\x0c\r\x0e\x0f\x10\x11\x12\x13\x14\x15\x16\x17\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f !\x22#$%&\'()*+,-./01234567'

---[ Ethernet ]---

dst = 00:02:15:37:a2:44

src = 00:ae:f3:52:aa:d1

type = 0x800

---[ IP ]---

version = 4L

ihl = 5L

tos = 0x0

len = 84

id = 2070

flags =

frag = 0L

ttl = 42

proto = ICMP

chksum = 0x861b

src = 66.35.250.151

dst = 192.168.5.21

options = ''

---[ ICMP ]---

type = echo-reply

code = 0

chksum = 0x91d9

id = 0xc245

seq = 0x0

---[ Raw ]---

load = 'B\xf7i\xa9\x00\x04\x149\x08\t\n\x0b\x0c\r\x0e\x0f\x10\x11\x12\x13\x14\x15\x16\x17\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f !\x22#$%&\'()*+,-./01234567'

---[ Padding ]---

load = '\n_\x00\x0b'

>>>sniff(iface=["eth1","eth2"], prn=lambda x: x.sniffed_on+": "+x.summary())

eth3: Ether / IP / ICMP 192.168.5.21 > 66.35.250.151 echo-request 0 / Raw

eth3: Ether / IP / ICMP 66.35.250.151 > 192.168.5.21 echo-reply 0 / Raw

eth2: Ether / IP / ICMP 192.168.5.22 > 66.35.250.152 echo-request 0 / Raw

eth2: Ether / IP / ICMP 66.35.250.152 > 192.168.5.22 echo-reply 0 / Raw

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值