aboutsummaryrefslogtreecommitdiffstats
path: root/examples/complex/xss_scanner.py
diff options
context:
space:
mode:
authorAldo Cortesi <aldo@corte.si>2018-04-16 07:35:20 +1200
committerGitHub <noreply@github.com>2018-04-16 07:35:20 +1200
commit5f74adc2df6d2a9452a9e3a6923fe05ba579e9e6 (patch)
treef1ba68e2dd5bcf6b673a32d91b468d767da86cdf /examples/complex/xss_scanner.py
parent865a373bd34589543e381f1de2f4b46740965d7e (diff)
parent0e984e1442e735a6a3cee5170bead492b231d620 (diff)
downloadmitmproxy-5f74adc2df6d2a9452a9e3a6923fe05ba579e9e6.tar.gz
mitmproxy-5f74adc2df6d2a9452a9e3a6923fe05ba579e9e6.tar.bz2
mitmproxy-5f74adc2df6d2a9452a9e3a6923fe05ba579e9e6.zip
Merge pull request #3059 from obscure76/enh/issue-3053
fix Python 3.6 variable type annotations #3053
Diffstat (limited to 'examples/complex/xss_scanner.py')
-rwxr-xr-xexamples/complex/xss_scanner.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/examples/complex/xss_scanner.py b/examples/complex/xss_scanner.py
index 0c0dd0f3..55fc2fe7 100755
--- a/examples/complex/xss_scanner.py
+++ b/examples/complex/xss_scanner.py
@@ -95,7 +95,7 @@ def find_unclaimed_URLs(body: str, requestUrl: bytes) -> None:
return None
class ScriptURLExtractor(HTMLParser):
- script_URLs = [] # type: List[str]
+ script_URLs: List[str] = []
def handle_starttag(self, tag, attrs):
if (tag == "script" or tag == "iframe") and "src" in [name for name, value in attrs]:
@@ -254,7 +254,7 @@ def paths_to_text(html: str, string: str) -> List[str]:
class PathHTMLParser(HTMLParser):
currentPath = ""
- paths = [] # type: List[str]
+ paths: List[str] = []
def handle_starttag(self, tag, attrs):
self.currentPath += ("/" + tag)