Some error handling on command line arguments

This commit is contained in:
Gökberk Yaltıraklı 2015-05-29 00:31:20 +03:00
parent fcff598745
commit cb36d7c376
2 changed files with 4 additions and 1 deletions

View File

@ -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",

View File

@ -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))