aboutsummaryrefslogtreecommitdiffstats
path: root/examples/complex/xss_scanner.py
diff options
context:
space:
mode:
Diffstat (limited to 'examples/complex/xss_scanner.py')
-rwxr-xr-xexamples/complex/xss_scanner.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/examples/complex/xss_scanner.py b/examples/complex/xss_scanner.py
index d5f4aaab..2a45511a 100755
--- a/examples/complex/xss_scanner.py
+++ b/examples/complex/xss_scanner.py
@@ -395,8 +395,10 @@ def get_XSS_data(body: Union[str, bytes], request_URL: str, injection_point: str
# response is mitmproxy's entry point
def response(flow: http.HTTPFlow) -> None:
+ assert flow.response
cookies_dict = get_cookies(flow)
resp = flow.response.get_text(strict=False)
+ assert resp
# Example: http://xss.guru/unclaimedScriptTag.html
find_unclaimed_URLs(resp, flow.request.url)
results = test_end_of_URL_injection(resp, flow.request.url, cookies_dict)