Update slowloris.py

Does a check if Socks library exists
This commit is contained in:
GettingGodlyInThisGame 2016-11-30 17:52:27 +13:00 committed by GitHub
parent 354c0ce028
commit 29ebfbcf1c
1 changed files with 6 additions and 4 deletions

View File

@ -25,10 +25,12 @@ if not args.host:
if args.useproxy: if args.useproxy:
print("Using SOCKS5 proxy for connecting...") print("Using SOCKS5 proxy for connecting...")
try:
import socks import socks
socks.setdefaultproxy(socks.PROXY_TYPE_SOCKS5, args.proxy_host, args.proxy_port) socks.setdefaultproxy(socks.PROXY_TYPE_SOCKS5, args.proxy_host, args.proxy_port)
socket.socket = socks.socksocket socket.socket = socks.socksocket
except ImportError:
print("Socks Proxy Library Not Available!")
if args.verbose == True: if args.verbose == True:
logging.basicConfig(format="[%(asctime)s] %(message)s", datefmt="%d-%m-%Y %H:%M:%S", level=logging.DEBUG) logging.basicConfig(format="[%(asctime)s] %(message)s", datefmt="%d-%m-%Y %H:%M:%S", level=logging.DEBUG)
else: else: