Compare commits

...

2 commits

Author SHA1 Message Date
vSpaike
4202dc0e43 requete mal formee 2025-01-11 23:44:50 +01:00
vSpaike
a1b54de57d app 2025-01-11 23:37:28 +01:00

23
client/app.py Normal file
View file

@ -0,0 +1,23 @@
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
'''