[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[or-cvs] r20323: {torflow} Do the confirmed thing a little smarter and add an initial c (torflow/trunk/NetworkScanners/ExitAuthority)
Author: mikeperry
Date: 2009-08-16 08:28:51 -0400 (Sun, 16 Aug 2009)
New Revision: 20323
Added:
torflow/trunk/NetworkScanners/ExitAuthority/cron.sh
Modified:
torflow/trunk/NetworkScanners/ExitAuthority/libsoat.py
torflow/trunk/NetworkScanners/ExitAuthority/soat.py
Log:
Do the confirmed thing a little smarter and add an initial
cron script.
Added: torflow/trunk/NetworkScanners/ExitAuthority/cron.sh
===================================================================
--- torflow/trunk/NetworkScanners/ExitAuthority/cron.sh (rev 0)
+++ torflow/trunk/NetworkScanners/ExitAuthority/cron.sh 2009-08-16 12:28:51 UTC (rev 20323)
@@ -0,0 +1 @@
+./snakeinspector --confirmed --email --noreason FailureTimeout
Modified: torflow/trunk/NetworkScanners/ExitAuthority/libsoat.py
===================================================================
--- torflow/trunk/NetworkScanners/ExitAuthority/libsoat.py 2009-08-16 08:12:16 UTC (rev 20322)
+++ torflow/trunk/NetworkScanners/ExitAuthority/libsoat.py 2009-08-16 12:28:51 UTC (rev 20323)
@@ -634,7 +634,7 @@
return str(safe_file[:200])
safeFilename = Callable(safeFilename)
- def __resultFilename(self, result, confirmed=False):
+ def __resultFilename(self, result):
address = ''
if result.__class__.__name__ == 'HtmlTestResult' or result.__class__.__name__ == 'HttpTestResult':
address = DataHandler.safeFilename(result.site[7:])
@@ -646,7 +646,7 @@
raise Exception, 'This doesn\'t seems to be a result instance.'
rdir = self.data_dir+result.proto.lower()+'/'
- if confirmed:
+ if result.confirmed:
rdir += 'confirmed/'
elif result.false_positive:
rdir += 'falsepositive/'
@@ -661,9 +661,9 @@
return DataHandler.uniqueFilename(str((rdir+address+'.'+result.exit_node[1:]+".result").decode('ascii', 'ignore')))
- def saveResult(self, result, confirmed=False):
+ def saveResult(self, result):
''' generic method for saving test results '''
- result.filename = self.__resultFilename(result, confirmed)
+ result.filename = self.__resultFilename(result)
SnakePickler.dump(result, result.filename)
def __testFilename(self, test, position=-1):
Modified: torflow/trunk/NetworkScanners/ExitAuthority/soat.py
===================================================================
--- torflow/trunk/NetworkScanners/ExitAuthority/soat.py 2009-08-16 08:12:16 UTC (rev 20322)
+++ torflow/trunk/NetworkScanners/ExitAuthority/soat.py 2009-08-16 12:28:51 UTC (rev 20323)
@@ -73,6 +73,8 @@
# XXX: Handle connectivity failures more gracefully..
+# XXX: Handle wedged tor streams a-la bwauthority
+
search_cookies=None
scanhdlr=None
datahandler=None
@@ -504,9 +506,9 @@
FALSEPOSITIVE_DEADSITE,
max_connect_fail_pct)
for r in self.results:
- if not r.false_positive and r.status == TEST_FAILURE:
- r.confirmed=True
- datahandler.saveResult(r, confirmed=True)
+ if not r.confirmed and not r.false_positive and r.status == TEST_FAILURE:
+ r.confirmed=True # only save confirmed stuff once.
+ datahandler.saveResult(r)
def _reset(self):
self.results = []