Auxiliary Interface¶
pcapkit.interface.misc contains auxiliary user interfaces, mostly added
on users’ requests.
- pcapkit.interface.misc.follow_tcp_stream(fin=None, verbose=False, extension=True, engine=None, fout=None, format=None, byteorder=sys.byteorder, nanosecond=False, trace_bidirectional=True, trace_analyse=False)[source]¶
Follow TCP streams.
- Parameters:
fin (
str|None) – file name to be read; if the file does not exist, raiseFileNotFoundextension (
bool) – if check and append extensions to output fileverbose (
bool) – if print verbose output informationengine (
Literal['default','pcapkit','dpkt','scapy','pyshark','pypcap','pcap_ct','pypcapfile'] |None) – extraction engine to be usedformat (
Literal['pcap','cap','json','tree','text','txt','plist','xml'] |None) – output file format of flow tracerbyteorder (
Literal['little','big']) – output file byte ordernanosecond (
bool) – output nanosecond-resolution file flagtrace_bidirectional (
bool) – whether both directions of a conversation are followed as one stream, which is the default;Falsegives one stream per directiontrace_analyse (
bool) – whether each traced flow reassembles its application layer, so thatIndex.packetcan be read offExtractor.trace. Off by default; the returnedconversationscome from the TCP reassembly this function always runs.
- Return type:
- Returns:
Tuple of extracted TCP streams.
Changed in version 1.5.0:
trace_bidirectionalandtrace_analyseare added. By default a stream holds both directions of a conversation; 1.4.x returned one stream per direction.