pcapng_utils.har.pirogue_enrichment package
Submodules
pcapng_utils.har.pirogue_enrichment.base module
pcapng_utils.har.pirogue_enrichment.decryption module
- class pcapng_utils.har.pirogue_enrichment.decryption.ContentDecryption(har_data, input_data_file)[source]
Bases:
HarEnrichment
pcapng_utils.har.pirogue_enrichment.sorted_list module
cf. https://docs.python.org/3.11/library/bisect.html#searching-sorted-lists
- pcapng_utils.har.pirogue_enrichment.sorted_list.get_closest_in_window(lst, key, rel_window)[source]
Find element with closest key in provided relative window of keys (inclusive)
pcapng_utils.har.pirogue_enrichment.stacktrace module
- class pcapng_utils.har.pirogue_enrichment.stacktrace.HAREntryMetadata(community_id: str, direction: Literal['in', 'out'], timestamp: float, entry_id: str, is_http2: bool)[source]
Bases:
object
- class pcapng_utils.har.pirogue_enrichment.stacktrace.Stacktrace(har_data, input_data_file, *, systematic_time_shift=0.0, time_window_requests=(-5.0, 2.0), time_window_responses=(-2.0, 5.0))[source]
Bases:
HarEnrichment
- DO_NOT_EXPORT_STACKTRACE_KEYS: ClassVar = {'communityId', 'destIp', 'destPort', 'localIp', 'localPort'}
- systematic_time_shift
Systematic time shift in seconds between socket operations timestamps vs. network traffic timestamps.
Indeed socket operations timestamps come from phone date, whereas network traffic timestamps come from Pirogue date, which may be desynchronized.
Positive means network traffic timestamps (Pirogue) were earlier than socket operations timestamps (phone).
- time_windows: dict[Literal['in', 'out'], tuple[float, float]]
Tolerances (in seconds) regarding chronology of socket operations compared to network traffic (per flow direction).
For outbound network traffic, the socket operation shall be in the past, or a very very close future,
For inbound network traffic, it is the opposite.
pcapng_utils.har.pirogue_enrichment.types module
- pcapng_utils.har.pirogue_enrichment.types.Timestamp
timestamp (in seconds)
pcapng_utils.har.pirogue_enrichment.utils module
- pcapng_utils.har.pirogue_enrichment.utils.clean_prefixed_ip_address(ip_address)[source]
- Return type:
- pcapng_utils.har.pirogue_enrichment.utils.keys_to_camel_case(obj, *, prefix='')[source]
Recursively rename all keys of dictionaries within object with camel case (optionally prefixed).
- Return type:
_T
Module contents
- class pcapng_utils.har.pirogue_enrichment.ContentDecryption(har_data, input_data_file)[source]
Bases:
HarEnrichment
- class pcapng_utils.har.pirogue_enrichment.HarEnrichment(har_data, input_data_file)[source]
Bases:
ABC
- class pcapng_utils.har.pirogue_enrichment.Stacktrace(har_data, input_data_file, *, systematic_time_shift=0.0, time_window_requests=(-5.0, 2.0), time_window_responses=(-2.0, 5.0))[source]
Bases:
HarEnrichment
- DO_NOT_EXPORT_STACKTRACE_KEYS: ClassVar = {'communityId', 'destIp', 'destPort', 'localIp', 'localPort'}
- systematic_time_shift
Systematic time shift in seconds between socket operations timestamps vs. network traffic timestamps.
Indeed socket operations timestamps come from phone date, whereas network traffic timestamps come from Pirogue date, which may be desynchronized.
Positive means network traffic timestamps (Pirogue) were earlier than socket operations timestamps (phone).
- time_windows: dict[Literal['in', 'out'], tuple[float, float]]
Tolerances (in seconds) regarding chronology of socket operations compared to network traffic (per flow direction).
For outbound network traffic, the socket operation shall be in the past, or a very very close future,
For inbound network traffic, it is the opposite.