1
import pyshark
pkts = pyshark.FileCapture("test.pcap")
for p in pkts:
print
모든 대상 포트와 원본 포트를 PCAP 파일에 인쇄하려고합니다. 내가 어떻게 할 수 있니?PCAP 파일의 모든 대상 포트와 원본 포트를 인쇄하는 방법은 무엇입니까?
import pyshark
pkts = pyshark.FileCapture("test.pcap")
for p in pkts:
print
모든 대상 포트와 원본 포트를 PCAP 파일에 인쇄하려고합니다. 내가 어떻게 할 수 있니?PCAP 파일의 모든 대상 포트와 원본 포트를 인쇄하는 방법은 무엇입니까?
import pyshark
pkts = pyshark.FileCapture('cap.pcap')
for p in pkts:
if hasattr(p, 'tcp'):
print(p.tcp.srcport + ' -- ' + p.tcp.dstport)
if hasattr(p, 'udp'):
print(p.udp.srcport + ' -- ' + p.udp.dstport)