mirror of https://github.com/Askill/slowloris.git
Improve logging
This commit is contained in:
parent
5cb7d9a3a7
commit
8bab4eca1b
|
|
@ -108,7 +108,8 @@ def main():
|
||||||
try:
|
try:
|
||||||
logging.debug("Creating socket nr %s", _)
|
logging.debug("Creating socket nr %s", _)
|
||||||
s = init_socket(ip)
|
s = init_socket(ip)
|
||||||
except socket.error:
|
except socket.error as e:
|
||||||
|
logging.debug(e)
|
||||||
break
|
break
|
||||||
list_of_sockets.append(s)
|
list_of_sockets.append(s)
|
||||||
|
|
||||||
|
|
@ -127,13 +128,14 @@ def main():
|
||||||
s = init_socket(ip)
|
s = init_socket(ip)
|
||||||
if s:
|
if s:
|
||||||
list_of_sockets.append(s)
|
list_of_sockets.append(s)
|
||||||
except socket.error:
|
except socket.error as e:
|
||||||
|
logging.debug(e)
|
||||||
break
|
break
|
||||||
logging.debug("Sleeping for %d seconds", args.sleeptime)
|
logging.debug("Sleeping for %d seconds", args.sleeptime)
|
||||||
time.sleep(args.sleeptime)
|
time.sleep(args.sleeptime)
|
||||||
|
|
||||||
except (KeyboardInterrupt, SystemExit):
|
except (KeyboardInterrupt, SystemExit):
|
||||||
print("\nStopping Slowloris...")
|
logging.info("Stopping Slowloris")
|
||||||
break
|
break
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue