Skip to content

Commit

Permalink
Make the warning message conditional
Browse files Browse the repository at this point in the history
  • Loading branch information
shenril committed Aug 28, 2019
1 parent e287095 commit 4bd2872
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 5 deletions.
2 changes: 2 additions & 0 deletions lib/modules/fingerprints/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ class Fingerprints:
def __init__(self, agent, proxy, redirect, timeout, url, cookie):
self.url = url
self.cookie = cookie
self.redirect=redirect
self.output = Services.get("output")
self.request = Services.get("request_factory")

Expand All @@ -43,6 +44,7 @@ def run(self, plugins_activated):
url=self.url,
method="GET",
payload=None,
redirect=self.redirect,
headers=None,
cookies=self.cookie,
)
Expand Down
8 changes: 6 additions & 2 deletions lib/modules/fingerprints/waf/__init__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
from lib.utils.output import Output
from lib.utils.container import Services

Output().info("For better waf detection we recommend you to run with --no-redirect")
output = Services.get("output")
request = Services.get("request_factory")

if request.redirect == True:
output.info("For better waf detection we recommend you to run with --no-redirect")
3 changes: 0 additions & 3 deletions lib/request/request.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,6 @@
from . import ragent as ragent
from lib.utils.container import Services


# TODO Replace requests with Octopus-http to parallel the requests
# @ref https://github.com/heynemann/octopus
# Create a RequestFactory with getSingleRequest, getParallelRequests+enqueue
class SingleRequest:
def __init__(self, **kwargs):
Expand Down

0 comments on commit 4bd2872

Please sign in to comment.