小编Doo*_*hoi的帖子

pyshark无法在Windows 7(python)上捕获数据包

我想用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()
Run Code Online (Sandbox Code Playgroud)

这是结果


capturing...
end of capture.
<LiveCapture (0 packets)>
Run Code Online (Sandbox Code Playgroud)

Livecapture是0包.我不知道是怎么回事.请帮我.

python windows networking capture pyshark

5
推荐指数
1
解决办法
906
查看次数

标签 统计

capture ×1

networking ×1

pyshark ×1

python ×1

windows ×1