我想用pyshark捕获数据包.但我无法在Windows 7上捕获数据包.
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包.我不知道是怎么回事.请帮我.