commit 059298f7cf0d3a96a74b966552ebe06992e8dfee Author: Sathyanarayanan Gunasekaran gsathya.ceg@gmail.com Date: Sun Oct 9 16:12:50 2011 +0530
Added usage() function --- NetworkScanners/ExitAuthority/soat.py | 18 ++++++++++-------- 1 files changed, 10 insertions(+), 8 deletions(-)
diff --git a/NetworkScanners/ExitAuthority/soat.py b/NetworkScanners/ExitAuthority/soat.py index bafe43f..7e43edb 100755 --- a/NetworkScanners/ExitAuthority/soat.py +++ b/NetworkScanners/ExitAuthority/soat.py @@ -2638,12 +2638,7 @@ def setup_handler(out_dir, cookie_file, fixed_exits=[]): atexit.register(cleanup, *(c, l, f)) return (c,h)
- -# main logic -def main(argv): - # make sure we have something to test for - if len(argv) < 2: - print '' +def usage(): print 'Please provide at least one test option:' print '--pernode=<n>' print '--resume=<n>' @@ -2660,8 +2655,15 @@ def main(argv): print '--target=<ip or url>' print '--loglevel=<DEBUG|INFO|NOTICE|WARN|ERROR|NONE>' print '' - return - + + +# main logic +def main(argv): + # make sure we have something to test for + if len(argv) < 2: + usage() + return + TorUtil.read_config(data_dir+"/torctl.cfg")
opts = ['ssl','rescan', 'pernode=', 'resume=','http','ssh','smtp','pop','imap','dns','dnsrebind','policies','exit=','target=','loglevel=']
tor-commits@lists.torproject.org