diff options
author | Aldo Cortesi <aldo@corte.si> | 2018-02-25 22:59:09 +1300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-02-25 22:59:09 +1300 |
commit | 236d88165499a3927caf193b884ac5e3bff16e67 (patch) | |
tree | 0af5f0598251973f5921c4cf42c4403f40ff9065 /examples/complex/xss_scanner.py | |
parent | 6b5b71aefaffebeea9eb0003a25f039686c5b785 (diff) | |
parent | afbb7f117b8be34e35735e4b4b1244ee5c5bbae1 (diff) | |
download | mitmproxy-236d88165499a3927caf193b884ac5e3bff16e67.tar.gz mitmproxy-236d88165499a3927caf193b884ac5e3bff16e67.tar.bz2 mitmproxy-236d88165499a3927caf193b884ac5e3bff16e67.zip |
Merge pull request #2917 from luzpaz/misc-typos
Misc. typos
Diffstat (limited to 'examples/complex/xss_scanner.py')
-rwxr-xr-x | examples/complex/xss_scanner.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/examples/complex/xss_scanner.py b/examples/complex/xss_scanner.py index 0ee38cd4..0c0dd0f3 100755 --- a/examples/complex/xss_scanner.py +++ b/examples/complex/xss_scanner.py @@ -215,7 +215,7 @@ def get_SQLi_data(new_body: str, original_body: str, request_URL: str, injection # A qc is either ' or " def inside_quote(qc: str, substring_bytes: bytes, text_index: int, body_bytes: bytes) -> bool: - """ Whether the Numberth occurence of the first string in the second + """ Whether the Numberth occurrence of the first string in the second string is inside quotes as defined by the supplied QuoteChar """ substring = substring_bytes.decode('utf-8') body = body_bytes.decode('utf-8') @@ -246,7 +246,7 @@ def paths_to_text(html: str, string: str) -> List[str]: - Note that it does a BFS """ def remove_last_occurence_of_sub_string(string: str, substr: str) -> str: - """ Delete the last occurence of substr from str + """ Delete the last occurrence of substr from str String String -> String """ index = string.rfind(substr) @@ -274,7 +274,7 @@ def paths_to_text(html: str, string: str) -> List[str]: def get_XSS_data(body: Union[str, bytes], request_URL: str, injection_point: str) -> Optional[XSSData]: """ Return a XSSDict if there is a XSS otherwise return None """ def in_script(text, index, body) -> bool: - """ Whether the Numberth occurence of the first string in the second + """ Whether the Numberth occurrence of the first string in the second string is inside a script tag """ paths = paths_to_text(body.decode('utf-8'), text.decode("utf-8")) try: @@ -284,7 +284,7 @@ def get_XSS_data(body: Union[str, bytes], request_URL: str, injection_point: str return False def in_HTML(text: bytes, index: int, body: bytes) -> bool: - """ Whether the Numberth occurence of the first string in the second + """ Whether the Numberth occurrence of the first string in the second string is inside the HTML but not inside a script tag or part of a HTML attribute""" # if there is a < then lxml will interpret that as a tag, so only search for the stuff before it |