This commit is contained in:
vSpaike 2025-01-11 23:37:28 +01:00
parent a38d84d8fe
commit a1b54de57d

View file

@ -1,6 +1,21 @@
from scapy.all import *
import socket
import random as r
for i in range(512,2048):
pkt = IP(dst='web') / IP(src='192.168.1.69')/ TCP(dport=80,sport=i,flags='S') / ICMP()
send(pkt, loop=1)
L=[
"G3T / HTTP/1.1\r\nHøst: localhost\r\n\r\n",
"GET /index.html HTTP/1.1\r\nHost: localhost\r\n\r\n",
"GET /about.html HTTP/1.1\r\nHost: localhost\r\n\r\n"
]
adresse="localhost"
port=80
with socket.socket(family=socket.AF_INET, type=socket.SOCK_STREAM) as s:
s.connect(adresse,port)
s.send(L[r.randint(0,2)].encode())
'''
GET / HTTP/1.1
Host: example.com
'''