[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[or-cvs] [torflow/master 2/2] Fix bug #2127: Make SoaT less noisy.



Author: Mike Perry <mikeperry-git@xxxxxxxxxx>
Date: Tue, 9 Nov 2010 22:03:41 -0800
Subject: Fix bug #2127: Make SoaT less noisy.
Commit: 3cef23a44a1b08798e1764b070272a247f97fcbc

Now, we ignore a whole bunch of noisy reason codes until they have been
verified. Reason codes that indicate really bad activity are still reported
immediately.
---
 NetworkScanners/ExitAuthority/cron.sh           |    8 +++++++-
 NetworkScanners/ExitAuthority/snakeinspector.py |    7 +++++--
 2 files changed, 12 insertions(+), 3 deletions(-)

diff --git a/NetworkScanners/ExitAuthority/cron.sh b/NetworkScanners/ExitAuthority/cron.sh
index 5472457..caf5213 100755
--- a/NetworkScanners/ExitAuthority/cron.sh
+++ b/NetworkScanners/ExitAuthority/cron.sh
@@ -9,7 +9,13 @@ cd $SCANDIR
 # 4. Only report from urls that fail from less than 10% of the total
 #    exits tested so far. (--siterate 10)
 # 5. Only report exits that fail 100% of their tests (--exitrate 99)
-./snakeinspector.py --email --exitrate 99 --siterate 10 --croninterval 1
+./snakeinspector.py --email --exitrate 99 --siterate 10 --croninterval 1 \
+   --noreason FailureConnError --noreason FailureHostUnreach \
+   --noreason FailureConnRefused --noreason FailureExitTruncation \
+   --noreason FailureBadHTTPCode404 --noreason FailureNoExitContent \
+   --noreason FailureTimeout 
+
+./snakeinspector.py --confirmed --email --siterate 10 --croninterval 1
 
 # Optionally, you can use these two lines to allow less regular cron
 # scheduling:
diff --git a/NetworkScanners/ExitAuthority/snakeinspector.py b/NetworkScanners/ExitAuthority/snakeinspector.py
index 8dc2f69..47d2c2e 100755
--- a/NetworkScanners/ExitAuthority/snakeinspector.py
+++ b/NetworkScanners/ExitAuthority/snakeinspector.py
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/python2.6
 
 import smtplib
 from email.MIMEMultipart import MIMEMultipart
@@ -214,7 +214,10 @@ def main(argv):
       if r.finish_timestamp < conf.finishedafter: continue
       if conf.finishedbefore < r.finish_timestamp: continue
     if (conf.falsepositives) ^ r.false_positive: continue
-    if conf.confirmed != r.confirmed: continue
+
+    # XXX: r.confirmed is not used. The variable to use here is r.from_rescan.
+    # We should fix this in libsoat.py and soat.py someday.
+    if conf.confirmed != r.from_rescan: continue
     if conf.confirmed:
       if conf.cron_interval and r.finish_timestamp < now-conf.cron_interval-60:
         continue
-- 
1.7.1