[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[or-cvs] r18447: {torflow} Add ability to scan just a particular exit. (torflow/trunk/NetworkScanners)
Author: mikeperry
Date: 2009-02-09 08:14:58 -0500 (Mon, 09 Feb 2009)
New Revision: 18447
Modified:
torflow/trunk/NetworkScanners/soat.py
Log:
Add ability to scan just a particular exit.
Modified: torflow/trunk/NetworkScanners/soat.py
===================================================================
--- torflow/trunk/NetworkScanners/soat.py 2009-02-09 12:39:25 UTC (rev 18446)
+++ torflow/trunk/NetworkScanners/soat.py 2009-02-09 13:14:58 UTC (rev 18447)
@@ -2027,10 +2027,11 @@
# print '--imap (~works)'
print '--dnsrebind (use with one or more of above tests)'
print '--policies'
+ print '--exit <exit>'
print ''
return
- opts = ['ssl','html','http','ssh','smtp','pop','imap','dns','dnsrebind','policies']
+ opts = ['ssl','html','http','ssh','smtp','pop','imap','dns','dnsrebind','policies','exit=']
flags, trailer = getopt.getopt(argv[1:], [], opts)
# get specific test types
@@ -2044,6 +2045,11 @@
do_dns_rebind = ('--dnsrebind','') in flags
do_consistency = ('--policies','') in flags
+ scan_exit=None
+ for flag in flags:
+ if flag[0] == "--exit":
+ scan_exit = flag[1]
+
# initiate the connection to the metatroller
mt = Metaconnection()
@@ -2113,7 +2119,19 @@
for test in tests.itervalues():
test.rewind()
-
+
+ if scan_exit:
+ plog("NOTICE", "Scanning only "+scan_exit)
+ mt.set_new_exit(scan_exit)
+ mt.get_new_circuit()
+
+ for test in tests.values():
+ # Keep testing failures and inconclusives
+ result = test.run_test()
+ plog("INFO", test.proto+" test via "+scan_exit+" has result "+str(result))
+ plog('INFO', 'Done.')
+ sys.exit(0)
+
# start testing
while 1:
avail_tests = tests.values()