Created
November 10, 2024 14:09
-
-
Save mdfranz/4416c3e95a304fb23e8ea90fa6bdf93c to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
import sys, pyshark | |
cap = pyshark.FileCapture(sys.argv[1]) | |
for e in cap: | |
if 'IP' in e: | |
if 'TCP' in e: | |
print (e['eth'].src,e['ip'].src,e['eth'].dst,e['ip'].dst) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment