Skip to content

port79.response

Response class representing Finger query results and protocol metadata.

Response

Response(
    uri: FingerURI,
    raw_bytes: bytes,
    *,
    encoding: str = "utf-8",
    latency: float = 0.0,
)

Represents a response received from a Finger server.

Parameters:

Name Type Description Default

uri

FingerURI

The FingerURI associated with this response.

required

raw_bytes

bytes

The raw bytes returned by the Finger server.

required

encoding

str

Text encoding for decoding response bytes (defaults to 'utf-8').

'utf-8'

latency

float

Request latency in seconds.

0.0

encoding property

encoding: str

The character encoding used to decode the response bytes.

is_forwarding_query property

is_forwarding_query: bool

Whether the query involved remote host forwarding.

is_system_query property

is_system_query: bool

Whether the query was a system-wide query for logged-in users.

is_user_query property

is_user_query: bool

Whether the query was for a specific user.

is_verbose property

is_verbose: bool

Whether the query was made with the /W verbose switch.

latency property

latency: float

The request round-trip latency in seconds.

lines cached property

lines: list[str]

The decoded response text split into lines.

query_kind property

query_kind: QueryKind

The QueryKind enumeration value representing the request query type.

raw_bytes property

raw_bytes: bytes

The raw bytes received from the Finger server.

raw_query property

raw_query: str

The exact formatted Finger protocol command string sent over TCP.

target_host property

target_host: str

The target server host to which the query was sent.

text cached property

text: str

The decoded text content of the response.

uri property

uri: FingerURI

The FingerURI associated with this response.

username property

username: str | None

The username queried, or None for a system query.

__str__

__str__() -> str

Return the decoded text response.