From cb36d7c376fca955b3070b84595d6c50eac8cd35 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C3=B6kberk=20Yalt=C4=B1rakl=C4=B1?= Date: Fri, 29 May 2015 00:31:20 +0300 Subject: [PATCH] Some error handling on command line arguments --- setup.py | 2 +- slowloris.py | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/setup.py b/setup.py index aa49d77..38639ed 100644 --- a/setup.py +++ b/setup.py @@ -3,7 +3,7 @@ setup( name = "Slowloris", py_modules = ["slowloris"], entry_points = {"console_scripts": ["slowloris=slowloris:main"]}, - version = "0.1", + version = "0.1.1", description = "Low bandwidth DoS tool. Slowloris rewrite in Python.", author = "Gokberk Yaltirakli", author_email = "webdosusb@gmail.com", diff --git a/slowloris.py b/slowloris.py index 70c5b4b..d93624d 100644 --- a/slowloris.py +++ b/slowloris.py @@ -27,6 +27,9 @@ def init_socket(ip): return s def main(): + if len(sys.argv) != 2: + print("Usage: {} example.com".format(sys.argv[0])) + return ip = sys.argv[1] socket_count = 200 log("Attacking {} with {} sockets.".format(ip, socket_count))