mirror of
https://github.com/jayofelony/pwnagotchi.git
synced 2025-07-01 18:37:27 -04:00
Testing pcapng fileformat
This commit is contained in:
@ -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('.pcap'))
|
||||
normalized_handshake = normalize(os.path.basename(handshake).rstrip('.pcapng'))
|
||||
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, "*.pcap")
|
||||
expr = os.path.join(path, "*.pcapng")
|
||||
return len(glob.glob(expr))
|
||||
|
||||
|
||||
@ -498,11 +498,11 @@ def md5(fname):
|
||||
return hash_md5.hexdigest()
|
||||
|
||||
|
||||
def extract_from_pcap(path, fields):
|
||||
def extract_from_pcapng(path, fields):
|
||||
"""
|
||||
Search in pcap-file for specified information
|
||||
Search in pcapng-file for specified information
|
||||
|
||||
path: Path to pcap file
|
||||
path: Path to pcapng file
|
||||
fields: Array of fields that should be extracted
|
||||
|
||||
If a field is not found, FieldNotFoundError is raised
|
||||
|
Reference in New Issue
Block a user