Skip to content

Commit

Permalink
Bug fix (-p Host didn't work, while -p host worked)
Browse files Browse the repository at this point in the history
  • Loading branch information
stamparm committed Nov 9, 2015
1 parent 4264900 commit 22484c8
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/core/target.py
Original file line number Diff line number Diff line change
Expand Up @@ -327,7 +327,7 @@ def process(match, repl):
if httpHeader == HTTP_HEADER.USER_AGENT:
conf.parameters[PLACE.USER_AGENT] = urldecode(headerValue)

condition = any((not conf.testParameter, intersect(conf.testParameter, USER_AGENT_ALIASES)))
condition = any((not conf.testParameter, intersect(conf.testParameter, USER_AGENT_ALIASES, True)))

if condition:
conf.paramDict[PLACE.USER_AGENT] = {PLACE.USER_AGENT: headerValue}
Expand All @@ -336,7 +336,7 @@ def process(match, repl):
elif httpHeader == HTTP_HEADER.REFERER:
conf.parameters[PLACE.REFERER] = urldecode(headerValue)

condition = any((not conf.testParameter, intersect(conf.testParameter, REFERER_ALIASES)))
condition = any((not conf.testParameter, intersect(conf.testParameter, REFERER_ALIASES, True)))

if condition:
conf.paramDict[PLACE.REFERER] = {PLACE.REFERER: headerValue}
Expand All @@ -345,7 +345,7 @@ def process(match, repl):
elif httpHeader == HTTP_HEADER.HOST:
conf.parameters[PLACE.HOST] = urldecode(headerValue)

condition = any((not conf.testParameter, intersect(conf.testParameter, HOST_ALIASES)))
condition = any((not conf.testParameter, intersect(conf.testParameter, HOST_ALIASES, True)))

if condition:
conf.paramDict[PLACE.HOST] = {PLACE.HOST: headerValue}
Expand Down

0 comments on commit 22484c8

Please sign in to comment.