Skip to content

Commit 659689e

Browse files
committed
tcp layer build flag/value fix
1 parent f20486e commit 659689e

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

providers/http/nfqueue/nfqueue.go

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -103,12 +103,13 @@ func (w *HTTPProvider) serve(domain, token, keyAuth string) error {
103103
log.Infof("got token packet")
104104
replyhttp := craftkeyauthresponse(keyAuth)
105105
outputTcp := &layers.TCP{
106-
Seq: 3398127,
106+
Seq: inputTcp.Ack - 1,
107107
// we reply back so reverse src and dst ports
108-
SrcPort: inputTcp.DstPort,
109-
DstPort: inputTcp.SrcPort,
110-
Ack: inputTcp.Seq + 1,
111-
Window: 100,
108+
SrcPort: inputTcp.DstPort,
109+
DstPort: inputTcp.SrcPort,
110+
Ack: inputTcp.Seq + uint32(len(tcpLayer.LayerPayload())),
111+
DataOffset: 5,
112+
PSH: true,
112113
}
113114
outputTcp.Payload = replyhttp
114115
//check network layer

0 commit comments

Comments
 (0)