FTP - File Transfer Protocol¶
pcapkit.protocols.application.ftp
contains
FTP
only,
which implements extractor for File Transfer Protocol
(FTP) [*].
- class pcapkit.protocols.application.ftp.FTP(file=None, length=None, **kwargs)[source]¶
Bases:
Application
[FTP
,FTP
]This class implements File Transfer Protocol.
- property name: Literal['File Transfer Protocol']¶
Name of current protocol.
- property length: NoReturn¶
Header length of current protocol.
- Raises:
UnsupportedCall – This protocol doesn’t support
length
.
- read(length=None, **kwargs)[source]¶
Read File Transfer Protocol (FTP).
- Parameters:
- Return type:
- Returns:
Parsed packet data.
- Raises:
ProtocolError – If the packet is malformed.
- make(cmmd=None, code=None, args=None, more=False, **kwargs)[source]¶
Make (construct) packet data.
- Parameters:
- Return type:
- Returns:
Constructed packet data.
- class pcapkit.protocols.application.ftp.FTP_DATA(file=None, length=None, **kwargs)[source]¶
Bases:
Raw
This class implements FTP data channel transmission.
Auxiliary Data¶
- class pcapkit.protocols.application.ftp.Type(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)[source]¶
Bases:
StrEnum
FTP packet type.
- REQUEST = 'request'¶
Request packet.
- RESPONSE = 'response'¶
Response packet.
- static _generate_next_value_(name, start, count, last_values)¶
Return the lower-cased version of the member name.
Header Schemas¶
Data Models¶
- class pcapkit.protocols.data.application.ftp.FTP(dict_=None, **kwargs)[source]¶
Bases:
Protocol
Data model for FTP protocol.
- type: FTP_Type¶
Type.
- class pcapkit.protocols.data.application.ftp.Request(*args: VT, **kwargs: VT)[source]¶
Bases:
FTP
Data model for FTP request.
- type: Literal[FTP_Type.REQUEST]¶
Type.
- cmmd: Command¶
Command.
- args: str¶
Arguments.
- class pcapkit.protocols.data.application.ftp.Response(*args: VT, **kwargs: VT)[source]¶
Bases:
FTP
Data model for FTP response.
- type: Literal[FTP_Type.RESPONSE]¶
Type.
- code: ReturnCode¶
Return code.
- args: str¶
Arguments.
- more: bool¶
More data flag.
Footnotes