revert pcapng

Signed-off-by: jayofelony <oudshoorn.jeroen@gmail.com>
This commit is contained in:
jayofelony
2024-03-13 07:59:37 +01:00
parent 541865a2eb
commit 09a82aa0b4
8 changed files with 28 additions and 28 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:
@ -448,7 +448,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))
@ -506,11 +506,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