don't force 3 ports / sequence numbers
This commit is contained in:
parent
0125993ccd
commit
7d2a92346d
|
@ -20,15 +20,15 @@ type
|
||||||
# Requests
|
# Requests
|
||||||
TcpSyniConnect = object
|
TcpSyniConnect = object
|
||||||
srcIp: IpAddress
|
srcIp: IpAddress
|
||||||
srcPorts: array[3, Port]
|
srcPorts: seq[Port]
|
||||||
dstIp: IpAddress
|
dstIp: IpAddress
|
||||||
dstPorts: array[3, Port]
|
dstPorts: seq[Port]
|
||||||
|
|
||||||
TcpSyniAccept = object
|
TcpSyniAccept = object
|
||||||
dstIp: IpAddress
|
dstIp: IpAddress
|
||||||
dstPorts: array[3, Port]
|
dstPorts: seq[Port]
|
||||||
srcIp: IpAddress
|
srcIp: IpAddress
|
||||||
srcPorts: array[3, Port]
|
srcPorts: seq[Port]
|
||||||
seqNums: seq[uint32]
|
seqNums: seq[uint32]
|
||||||
|
|
||||||
proc handleSigint() {.noconv.} =
|
proc handleSigint() {.noconv.} =
|
||||||
|
|
|
@ -98,7 +98,7 @@ proc captureAndResendAck(puncher: TcpSyniPuncher, captureFd: AsyncFD,
|
||||||
await injectFd.injectTcpPacket(parsed)
|
await injectFd.injectTcpPacket(parsed)
|
||||||
return
|
return
|
||||||
|
|
||||||
proc initPuncher*(srcPort: Port, dstIp: IpAddress, dstPorts: array[3, Port],
|
proc initPuncher*(srcPort: Port, dstIp: IpAddress, dstPorts: seq[Port],
|
||||||
seqNums: seq[uint32] = @[]): TcpSyniPuncher =
|
seqNums: seq[uint32] = @[]): TcpSyniPuncher =
|
||||||
let localIp = getPrimaryIPAddr(dstIp)
|
let localIp = getPrimaryIPAddr(dstIp)
|
||||||
# TODO: do real port prediction
|
# TODO: do real port prediction
|
||||||
|
|
Loading…
Reference in New Issue