96 static bool isSSHPort(uint16_t portSrc, uint16_t portDst)
98 return portSrc == 22 || portDst == 22;
123 :
Layer(data, dataLen, prevLayer, packet,
SSH)
177 :
SSHLayer(data, dataLen, prevLayer, packet)
279 #pragma pack(push, 1)
285 uint32_t packetLength;
286 uint8_t paddingLength;
296 :
SSHLayer(data, dataLen, prevLayer, packet)
299 ssh_message_base* getMsgBaseHeader()
const
301 return (ssh_message_base*)m_Data;
346 return getFieldValue(0);
355 return getFieldValue(1);
364 return getFieldValue(2);
373 return getFieldValue(3);
382 return getFieldValue(4);
391 return getFieldValue(5);
400 return getFieldValue(6);
409 return getFieldValue(7);
418 return getFieldValue(8);
427 return getFieldValue(9);
438 size_t m_FieldOffsets[11];
439 bool m_OffsetsInitialized;
441 void parseMessageAndInitOffsets();
443 std::string getFieldValue(
int fieldOffsetIndex);
463 :
SSHLayer(data, dataLen, prevLayer, packet)
Definition: SSHLayer.h:456
std::string toString() const
SSHEncryptedMessage(uint8_t *data, size_t dataLen, Layer *prevLayer, Packet *packet)
Definition: SSHLayer.h:462
size_t getHeaderLen() const
Definition: SSHLayer.h:471
Definition: SSHLayer.h:204
size_t getPaddingLength() const
std::string getMessageTypeStr() const
SSHHandshakeMessageType
Definition: SSHLayer.h:210
@ SSH_MSG_KEX_DH_INIT
Definition: SSHLayer.h:216
@ SSH_MSG_UNKNOWN
Definition: SSHLayer.h:226
@ SSH_MSG_KEX_DH_GEX_REPLY
Definition: SSHLayer.h:222
@ SSH_MSG_KEX_DH_GEX_REQUEST
Definition: SSHLayer.h:224
@ SSH_MSG_NEW_KEYS
Definition: SSHLayer.h:214
@ SSH_MSG_KEX_INIT
Definition: SSHLayer.h:212
@ SSH_MSG_KEX_DH_REPLY
Definition: SSHLayer.h:218
@ SSH_MSG_KEX_DH_GEX_INIT
Definition: SSHLayer.h:220
uint8_t * getSSHHandshakeMessage() const
size_t getHeaderLen() const
SSHHandshakeMessageType getMessageType() const
static SSHHandshakeMessage * tryParse(uint8_t *data, size_t dataLen, Layer *prevLayer, Packet *packet)
size_t getSSHHandshakeMessageLength() const
std::string toString() const
Definition: SSHLayer.h:140
size_t getHeaderLen() const
Definition: SSHLayer.h:164
std::string toString() const
std::string getIdentificationMessage()
static SSHIdentificationMessage * tryParse(uint8_t *data, size_t dataLen, Layer *prevLayer, Packet *packet)
Definition: SSHLayer.h:312
std::string getCompressionAlgorithmsClientToServer()
Definition: SSHLayer.h:398
std::string getCookieAsHexStream()
std::string getKeyExchangeAlgorithms()
Definition: SSHLayer.h:344
std::string getEncryptionAlgorithmsClientToServer()
Definition: SSHLayer.h:362
std::string getServerHostKeyAlgorithms()
Definition: SSHLayer.h:353
std::string getLanguagesClientToServer()
Definition: SSHLayer.h:416
std::string getCompressionAlgorithmsServerToClient()
Definition: SSHLayer.h:407
std::string getMacAlgorithmsClientToServer()
Definition: SSHLayer.h:380
std::string getMacAlgorithmsServerToClient()
Definition: SSHLayer.h:389
bool isFirstKexPacketFollows()
std::string getLanguagesServerToClient()
Definition: SSHLayer.h:425
std::string getEncryptionAlgorithmsServerToClient()
Definition: SSHLayer.h:371
SSHKeyExchangeInitMessage(uint8_t *data, size_t dataLen, Layer *prevLayer, Packet *packet)
Definition: SSHLayer.h:74
OsiModelLayer getOsiModelLayer() const
Definition: SSHLayer.h:115
static SSHLayer * createSSHMessage(uint8_t *data, size_t dataLen, Layer *prevLayer, Packet *packet)
void computeCalculateFields()
Definition: SSHLayer.h:112
static bool isSSHPort(uint16_t portSrc, uint16_t portDst)
Definition: SSHLayer.h:96
The main namespace for the PcapPlusPlus lib.
OsiModelLayer
Definition: ProtocolType.h:354
@ OsiModelApplicationLayer
Definition: ProtocolType.h:368
const ProtocolType SSH
Definition: ProtocolType.h:238
Definition: SSHLayer.h:284