public void SetClientHello(TlsPacket.TlsClientHello clientHello, TlsPacketContext packetContext) { string GetCipherSuites(TlsPacket.CipherSuites cipherSuites) { var suites = cipherSuites.Items.Select(x => ((TlsCipherSuite)x).ToString()); return($"[{String.Join(',', suites)}]"); } m_conversationModel.SessionId = ByteString.ByteArrayToString(clientHello.SessionId.Sid); m_conversationModel.ClientRandom = ByteString.ByteArrayToString(clientHello.Random.RandomBytes); m_conversationModel.ClientCipherSuites = GetCipherSuites(clientHello.CipherSuites); m_conversationModel.ClientExtensions = GetExtensions(clientHello.Extensions); m_conversationModel.Timestamp = DateTimeOffset.FromUnixTimeMilliseconds(packetContext.Metadata.Timestamp); }
public void SetClientHello(TlsPacket.TlsClientHello clientHello, TlsPacketContext packetContext) { m_tlsDecoder.ClientRandom = ByteString.Combine(clientHello.Random.RandomTime, clientHello.Random.RandomBytes); }