From 95f074e2025902a1a07abf8e54b076cd8665c56b Mon Sep 17 00:00:00 2001 From: Christian Ulrich Date: Fri, 17 Jul 2020 10:37:33 +0200 Subject: [PATCH] first TCP packet always has only SYN flag --- tcp_syni.nim | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/tcp_syni.nim b/tcp_syni.nim index 7b0200d..803ceb2 100644 --- a/tcp_syni.nim +++ b/tcp_syni.nim @@ -72,8 +72,7 @@ proc captureSeqNumbers(puncher: TcpSyniPuncher, rawFd: AsyncFD, parsed.tcpIpSrc == puncher.srcIp and parsed.tcpPortSrc.int == puncher.srcPort.int and parsed.tcpIpDst == puncher.dstIp and - parsed.tcpFlags.contains(SYN) and - not parsed.tcpFlags.contains(ACK): + parsed.tcpFlags == {SYN}: for i, port in puncher.dstPorts.pairs: if parsed.tcpPortDst.int == port.int: seqNums.add(parsed.tcpSeqNumber)