diff options
author | Maximilian Hils <git@maximilianhils.com> | 2019-11-15 18:10:42 +0100 |
---|---|---|
committer | Maximilian Hils <git@maximilianhils.com> | 2019-11-15 18:10:42 +0100 |
commit | 0873566ff05c02be063f3aa15adecb725342119c (patch) | |
tree | a6dcddf0f0c08c9ff9cdd89e1f95196af2ff5a6a /examples/complex/xss_scanner.py | |
parent | d852f292c9a45de7f45cc8537f2aef217259017e (diff) | |
parent | fbbbbb678e77e3cff5ab35b1fd55e85e875ed3f5 (diff) | |
download | mitmproxy-0873566ff05c02be063f3aa15adecb725342119c.tar.gz mitmproxy-0873566ff05c02be063f3aa15adecb725342119c.tar.bz2 mitmproxy-0873566ff05c02be063f3aa15adecb725342119c.zip |
Merge remote-tracking branch 'origin/master' into pr-3448
Diffstat (limited to 'examples/complex/xss_scanner.py')
-rwxr-xr-x | examples/complex/xss_scanner.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/examples/complex/xss_scanner.py b/examples/complex/xss_scanner.py index 97e94ed4..d5f4aaab 100755 --- a/examples/complex/xss_scanner.py +++ b/examples/complex/xss_scanner.py @@ -86,7 +86,7 @@ def get_cookies(flow: http.HTTPFlow) -> Cookies: return {name: value for name, value in flow.request.cookies.fields} -def find_unclaimed_URLs(body: str, requestUrl: bytes) -> None: +def find_unclaimed_URLs(body, requestUrl): """ Look for unclaimed URLs in script tags and log them if found""" def getValue(attrs: List[Tuple[str, str]], attrName: str) -> Optional[str]: for name, value in attrs: @@ -111,7 +111,7 @@ def find_unclaimed_URLs(body: str, requestUrl: bytes) -> None: try: socket.gethostbyname(domain) except socket.gaierror: - ctx.log.error("XSS found in %s due to unclaimed URL \"%s\"." % (requestUrl, url)) + ctx.log.error(f"XSS found in {requestUrl} due to unclaimed URL \"{url}\".") def test_end_of_URL_injection(original_body: str, request_URL: str, cookies: Cookies) -> VulnData: |