From 45a005737d6ae57bcdc5f6740bbbe4174d342a5b Mon Sep 17 00:00:00 2001 From: Bernardo Damele Date: Sun, 13 Feb 2011 21:08:42 +0000 Subject: [PATCH] Minor adjustment so that User-Agent and Referer headers are tests only when --level >= 3 and Cookie is tested only when --level >= 2 --- lib/controller/controller.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/lib/controller/controller.py b/lib/controller/controller.py index 304c9f6de..a1a9815fa 100644 --- a/lib/controller/controller.py +++ b/lib/controller/controller.py @@ -302,10 +302,12 @@ def start(): proceed = True for place in parameters: - # Test User-Agent header only if --level >= 4 - condition = (place == "User-Agent" and conf.level < 4) - # Test Cookie header only if --level >= 3 - condition |= (place == "Cookie" and conf.level < 3) + # Test User-Agent and Referer headers only if + # --level >= 3 + condition = (place == PLACE.UA and conf.level < 3) + condition |= (place == PLACE.REFERER and conf.level < 3) + # Test Cookie header only if --level >= 2 + condition |= (place == PLACE.COOKIE and conf.level < 2) if condition: continue