FreeBSD Bugzilla – Attachment 180814 Details for
Bug 217637
One TCP connection accepted TWO times
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
Scapy client
double_accept.py (text/x-python), 1.42 KB, created by
Alexandre martins
on 2017-03-14 13:10:06 UTC
(
hide
)
Description:
Scapy client
Filename:
MIME Type:
Creator:
Alexandre martins
Created:
2017-03-14 13:10:06 UTC
Size:
1.42 KB
patch
obsolete
>#!/usr/bin/env python >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,flags='DF') >SYN=TCP(sport=sport,dport=dport,flags='S',seq=255,options=[('MSS', 1460),('NOP', 1),('WScale', 5)]) >SYNACK=sr1(ip/SYN) > ># ACK >ACK=TCP(sport=sport, dport=dport, flags='A', seq=SYNACK.ack, ack=SYNACK.seq + 1) >send(ip/ACK) > >HEADER='POST /URL HTTP/1.1\r\nContent-Length: 10\r\nHost: '+dst+'\r\n\r\n' > >POST=TCP(sport=sport, dport=dport, flags='PA', seq=SYNACK.ack, ack=SYNACK.seq + 1)/Raw(HEADER) >DATA=TCP(sport=sport, dport=dport, flags='PA', seq=SYNACK.ack + HEADER.__len__(), ack=SYNACK.seq + 1)/Raw('a'* 10) > >RDR1=sr(ip/POST, multi=1, timeout=0.5) >send(ip/DATA) > >ALL_NO_ACK=TCP(sport=sport, dport=dport, flags='PA', seq=SYNACK.ack, ack=SYNACK.seq + 1)/Raw(HEADER + ('a' * 10)) > >time.sleep(0.1) >send(ip/ALL_NO_ACK) > >ALL_ACK=TCP(sport=sport, dport=dport, flags='PA', seq=SYNACK.ack, ack=RDR1[0][1][1].seq+1)/Raw(HEADER + ('a' * 10)) > >ACK_ALL=TCP(sport=sport, dport=dport, flags='A', seq=SYNACK.ack + 10 + HEADER.__len__(), ack=RDR1[0][1][1].seq) > >ACK_FIN=TCP(sport=sport, dport=dport, flags='A', seq=SYNACK.ack + 10 + HEADER.__len__(), ack=RDR1[0][1][1].seq+1) > >FIN=TCP(sport=sport, dport=dport, flags='FA', seq=SYNACK.ack + 10 + HEADER.__len__(), ack=RDR1[0][1][1].seq+1) > >send(ip/ACK_ALL) > >time.sleep(0.1) > >send(ip/ACK_FIN) > >time.sleep(0.1) > >send(ip/FIN) >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 217637
:
180626
|
180691
|
180692
| 180814 |
180829
|
180996
|
180997
|
180999
|
181000
|
184680