IPWorks EDI 2020 Python Edition

Questions / Feedback?

set_ssh_param Method

Used to write a field to the end of a payload.

Syntax

def set_ssh_param(payload: bytes, field_type: str, field_value: str) -> bytes: ...

Remarks

This method is used to build the payload portion of an SSH packet to be sent later by a call to send_ssh_packet. Payload should contain the result of a previous call to on_set_ssh_param. FieldType is a string defining the type of field to be written to the packet. FieldValue should be the string representation of the field to be written.

The following is a list of supported field types and a description of how FieldValue should be encoded:

sA plaintext string containing the default system encoding of the data.
sbA string containing the hex encoded data. (eg: "A1B23C")
mA variable-length large integer, encoded as a textual representation of the value ("1234").
iA 32-bit integer, encoded as a textual representation of the value (eg: "1234").
lA 64-bit integer, encoded as a textual representation of the value (eg: "1234").
bA single byte, encoded as a textual representation of the value (eg: "123").
fA boolean flag, encoded as a textual representation of the value (eg: 'true' or 'false')

Note: integer values may be encoded in hexadecimal by prefixing "0x" to the beginning of the string, otherwise the value is assumed to be base-10.

Note: This method is only applicable for reading and creating SSH packets for use within the on_ssh_custom_auth event.

Copyright (c) 2022 /n software inc. - All rights reserved.
IPWorks EDI 2020 Python Edition - Version 20.0 [Build 8203]