obfsproxy: validate_external_mode_cli() does not abort
validate_external_mode_cli()
should throw the appropriate argparse
exception, but currently it's just returning False.
This allows things like this to happen:
$ obfsproxy obfs2 client 127.0.0.1:5555
2013-09-25 18:34:49,346 [WARNING] Obfsproxy (version: 0.2.2_9_g37c9cbe-py2.7.egg) starting up.
2013-09-25 18:34:49,346 [ERROR] 'client' and 'server' modes need a destination address.
2013-09-25 18:34:49,346 [ERROR]
Traceback (most recent call last):
File "/usr/local/lib/python2.7/dist-packages/obfsproxy-0.2.2_9_g37c9cbe-py2.7.egg/obfsproxy/pyobfsproxy.py", line 152, in run
pyobfsproxy()
File "/usr/local/lib/python2.7/dist-packages/obfsproxy-0.2.2_9_g37c9cbe-py2.7.egg/obfsproxy/pyobfsproxy.py", line 134, in pyobfsproxy
do_external_mode(args)
File "/usr/local/lib/python2.7/dist-packages/obfsproxy-0.2.2_9_g37c9cbe-py2.7.egg/obfsproxy/pyobfsproxy.py", line 80, in do_external_mode
launch_transport.launch_transport_listener(args.name, args.listen_addr, args.mode, args.dest, args.ext_cookie_file)
File "/usr/local/lib/python2.7/dist-packages/obfsproxy-0.2.2_9_g37c9cbe-py2.7.egg/obfsproxy/network/launch_transport.py", line 40, in launch_transport_listener
assert(remote_addrport)
AssertionError
Traceback (most recent call last):
File "/usr/local/bin/obfsproxy", line 9, in <module>
load_entry_point('obfsproxy==0.2.2-9-g37c9cbe', 'console_scripts', 'obfsproxy')()
File "/usr/local/lib/python2.7/dist-packages/obfsproxy-0.2.2_9_g37c9cbe-py2.7.egg/obfsproxy/pyobfsproxy.py", line 152, in run
pyobfsproxy()
File "/usr/local/lib/python2.7/dist-packages/obfsproxy-0.2.2_9_g37c9cbe-py2.7.egg/obfsproxy/pyobfsproxy.py", line 134, in pyobfsproxy
do_external_mode(args)
File "/usr/local/lib/python2.7/dist-packages/obfsproxy-0.2.2_9_g37c9cbe-py2.7.egg/obfsproxy/pyobfsproxy.py", line 80, in do_external_mode
launch_transport.launch_transport_listener(args.name, args.listen_addr, args.mode, args.dest, args.ext_cookie_file)
File "/usr/local/lib/python2.7/dist-packages/obfsproxy-0.2.2_9_g37c9cbe-py2.7.egg/obfsproxy/network/launch_transport.py", line 40, in launch_transport_listener
assert(remote_addrport)
AssertionError