public static TlsCLientHello Create(System.Func <string, string, string> mapper, string[] values) { TlsCLientHello newObj = new TlsCLientHello(); newObj._FrameNumber = mapper.Invoke("frame.number", values[0]).ToInt32(); newObj._FrameTimeRelative = mapper.Invoke("frame.time_relative", values[1]).ToDouble(); newObj._IpSrc = mapper.Invoke("ip.src", values[2]).ToString(); newObj._IpDst = mapper.Invoke("ip.dst", values[3]).ToString(); newObj._TcpSrcport = mapper.Invoke("tcp.srcport", values[4]).ToInt32(); newObj._TcpDstport = mapper.Invoke("tcp.dstport", values[5]).ToInt32(); newObj._TlsRecordVersion = mapper.Invoke("tls.record.version", values[6]).ToInt32(); newObj._TlsHandshakeCipherSuitesLength = mapper.Invoke("tls.handshake.cipher_suites_length", values[7]).ToInt32(); return(newObj); }
public override bool Equals(object obj) { TlsCLientHello that = obj as TlsCLientHello; return(((((((((that != null) && object.Equals(this.FrameNumber, that.FrameNumber)) && object.Equals(this.FrameTimeRelative, that.FrameTimeRelative)) && object.Equals(this.IpSrc, that.IpSrc)) && object.Equals(this.IpDst, that.IpDst)) && object.Equals(this.TcpSrcport, that.TcpSrcport)) && object.Equals(this.TcpDstport, that.TcpDstport)) && object.Equals(this.TlsRecordVersion, that.TlsRecordVersion)) && object.Equals(this.TlsHandshakeCipherSuitesLength, that.TlsHandshakeCipherSuitesLength)); }
public override void Define() { TlsCLientHello clientHello = null; TlsServerHello serverHello = null; When() .Match <TlsCLientHello>(() => clientHello) .Match <TlsServerHello>(() => serverHello, s => s.IpSrc == clientHello.IpDst, s => s.IpDst == clientHello.IpSrc, s => s.TcpSrcport == clientHello.TcpDstport, s => s.TcpDstport == clientHello.TcpSrcport); Then() .Do(ctx => ctx.TryInsert(new TlsHandshake { Timestamp = clientHello.FrameTimeRelative, IpSrc = clientHello.IpSrc, IpDst = clientHello.IpDst, TcpSrcport = clientHello.TcpSrcport, TcpDstport = clientHello.TcpDstport, ClientHello = clientHello, ServerHello = serverHello, })); }