aboutsummaryrefslogtreecommitdiffstats
path: root/examples/complex/xss_scanner.py
diff options
context:
space:
mode:
authorMaximilian Hils <git@maximilianhils.com>2019-11-16 14:56:01 +0100
committerMaximilian Hils <git@maximilianhils.com>2019-11-16 15:14:30 +0100
commitac22aee2f512cefd298fe0d9563a5de0ef7e42ee (patch)
tree131017b6a63eef67d676f106731989fab3525bce /examples/complex/xss_scanner.py
parentd17b9d62305507a93836eb6ee085fa3edd029bed (diff)
downloadmitmproxy-ac22aee2f512cefd298fe0d9563a5de0ef7e42ee.tar.gz
mitmproxy-ac22aee2f512cefd298fe0d9563a5de0ef7e42ee.tar.bz2
mitmproxy-ac22aee2f512cefd298fe0d9563a5de0ef7e42ee.zip
cleanup mypy usage
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)