【发布时间】:2016-03-14 10:40:40
【问题描述】:
我想使用 pyshark 捕获数据包。 但我无法在 Windows 7 上捕获数据包。
这是我的python代码
import pyshark
def NetCap():
print 'capturing...'
livecapture = pyshark.LiveCapture(interface="eth0", output_file='./test.pcapng')
livecapture.sniff(packet_count=10)
print 'end of capture.'
print livecapture
if __name__ == "__main__":
NetCap()
这是结果
capturing...
end of capture.
<LiveCapture (0 packets)>
Livecapture 是 0 个数据包。 我不知道怎么回事。 请帮帮我。
【问题讨论】:
-
你是怎么解决这个问题的? :)
-
我还是没有解决这个问题。 : (
标签: python windows networking capture pyshark