Skip to content

Commit

Permalink
Update slowloris.py
Browse files Browse the repository at this point in the history
Does a check if Socks library exists
  • Loading branch information
GettingGodlyInThisGame authored Nov 30, 2016
1 parent 354c0ce commit 29ebfbc
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions slowloris.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,12 @@

if args.useproxy:
print("Using SOCKS5 proxy for connecting...")
import socks
socks.setdefaultproxy(socks.PROXY_TYPE_SOCKS5, args.proxy_host, args.proxy_port)
socket.socket = socks.socksocket

try:
import socks
socks.setdefaultproxy(socks.PROXY_TYPE_SOCKS5, args.proxy_host, args.proxy_port)
socket.socket = socks.socksocket
except ImportError:
print("Socks Proxy Library Not Available!")
if args.verbose == True:
logging.basicConfig(format="[%(asctime)s] %(message)s", datefmt="%d-%m-%Y %H:%M:%S", level=logging.DEBUG)
else:
Expand Down

0 comments on commit 29ebfbc

Please sign in to comment.