⚲
Project
General
Profile
Sign in
Register
Home
Projects
Help
Search
:
Suricata
All Projects
Suricata
Overview
Activity
Roadmap
Issues
Wiki
Files
Download (403 Bytes)
Security #4504
» test-nozero-ack.py
Peter Manev
, 05/28/2021 10:02 AM
from
scapy.all
import
*
# VARIABLES
src
=
sys
.
argv
[
1
]
dst
=
sys
.
argv
[
2
]
sport
=
random
.
randint
(
1024
,
65535
)
dport
=
int
(
sys
.
argv
[
3
])
# SYN
ip
=
IP
(
src
=
src
,
dst
=
dst
)
#SYN=TCP(sport=sport,dport=dport,flags='S', seq=1000)
SYN
=
TCP
(
sport
=
sport
,
dport
=
dport
,
flags
=
'
S
'
,
ack
=
1234567
,
seq
=
1000
)
SYNACK
=
sr1
(
ip
/
SYN
)
# ACK
ACK
=
TCP
(
sport
=
sport
,
dport
=
dport
,
flags
=
'
A
'
,
seq
=
SYNACK
.
ack
,
ack
=
SYNACK
.
seq
+
1
)
send
(
ip
/
ACK
)
« Previous
1
2
Next »
(1-1/2)
Loading...