Revert "Testing pcapng fileformat"

This reverts commit 7040be2d30.
This commit is contained in:
Jeroen Oudshoorn
2024-02-08 20:06:33 +01:00
parent 53ed6f61c6
commit 0e274af5a0
9 changed files with 53 additions and 44 deletions

View File

@ -82,7 +82,7 @@ def remove_whitelisted(list_of_handshakes, list_of_whitelisted_strings, valid_on
for handshake in list_of_handshakes:
try:
normalized_handshake = normalize(os.path.basename(handshake).rstrip('.pcapng'))
normalized_handshake = normalize(os.path.basename(handshake).rstrip('.pcap'))
for whitelist in list_of_whitelisted_strings:
normalized_whitelist = normalize(whitelist)
if normalized_whitelist in normalized_handshake:
@ -440,7 +440,7 @@ def secs_to_hhmmss(secs):
def total_unique_handshakes(path):
expr = os.path.join(path, "*.pcapng")
expr = os.path.join(path, "*.pcap")
return len(glob.glob(expr))
@ -498,11 +498,11 @@ def md5(fname):
return hash_md5.hexdigest()
def extract_from_pcapng(path, fields):
def extract_from_pcap(path, fields):
"""
Search in pcapng-file for specified information
Search in pcap-file for specified information
path: Path to pcapng file
path: Path to pcap file
fields: Array of fields that should be extracted
If a field is not found, FieldNotFoundError is raised