斯凯比收到p后退出

2024-06-10 18:56:08 发布

您现在位置:Python中文网/ 问答频道 /正文

我试着和斯卡比嗅一些包裹。我使用了来自http://www.secdev.org的代码

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

(当然是在现有主机上)
但是当斯凯比收到第一个包裹时,斯凯比就自己退出了,其他什么都没有发生。它返回到标准终端(就像我输入了quit())

我使用:

^{pr2}$

Tags: and代码orghttp终端host标准www
1条回答
网友
1楼 · 发布于 2024-06-10 18:56:08

看看你引用的站点上的例子,你似乎需要更多的代码来查看捕获的内容。看看demo page还有几个电话正在进行

>>>  sniff(filter="icmp and host 66.35.250.151", count=2)
<Sniffed: UDP:0 TCP:0 ICMP:2 Other:0>
>>>  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]
<Ether 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=0x6571 id=0x8745 seq=0x0 |<Raw load='B\xf7g\xda\x00\x07um\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' |>>>>
>>> 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

(这只是演示页面本身的一个小片段)

相关问题 更多 >