Reworked how new options are passed.
This commit is contained in:
@@ -72,14 +72,15 @@ def main():
|
|||||||
console = InteractiveConsole()
|
console = InteractiveConsole()
|
||||||
if args.verbose > 1:
|
if args.verbose > 1:
|
||||||
websocket.enableTrace(True)
|
websocket.enableTrace(True)
|
||||||
opts = {}
|
options = {}
|
||||||
if (args.origin):
|
if (args.origin):
|
||||||
opts = { "origin": args.origin }
|
options["origin"] = args.origin
|
||||||
if (args.subprotocols):
|
if (args.subprotocols):
|
||||||
opts = { "subprotocols": args.subprotocols }
|
options["subprotocols"] = args.subprotocols
|
||||||
|
opts = {}
|
||||||
if (args.nocert):
|
if (args.nocert):
|
||||||
opts = { "cert_reqs": websocket.ssl.CERT_NONE, "check_hostname": False }
|
opts = { "cert_reqs": websocket.ssl.CERT_NONE, "check_hostname": False }
|
||||||
ws = websocket.create_connection(args.url, sslopt=opts)
|
ws = websocket.create_connection(args.url, sslopt=opts, **options)
|
||||||
print("Press Ctrl+C to quit")
|
print("Press Ctrl+C to quit")
|
||||||
|
|
||||||
def recv():
|
def recv():
|
||||||
|
Reference in New Issue
Block a user