Minor adjustment so that User-Agent and Referer headers are tests only when --level >= 3 and Cookie is tested only when --level >= 2

This commit is contained in:
Bernardo Damele 2011-02-13 21:08:42 +00:00
parent 83d7803ce7
commit 45a005737d

View File

@ -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