aboutsummaryrefslogtreecommitdiffstats
path: root/examples
diff options
context:
space:
mode:
Diffstat (limited to 'examples')
-rw-r--r--examples/addons/events.py2
-rw-r--r--examples/complex/README.md2
-rw-r--r--examples/complex/stream_modify.py2
-rwxr-xr-xexamples/complex/xss_scanner.py8
4 files changed, 7 insertions, 7 deletions
diff --git a/examples/addons/events.py b/examples/addons/events.py
index 93664954..d3c90430 100644
--- a/examples/addons/events.py
+++ b/examples/addons/events.py
@@ -155,7 +155,7 @@ class Events:
def log(self, entry: mitmproxy.log.LogEntry):
"""
- Called whenver a new log entry is created through the mitmproxy
+ Called whenever a new log entry is created through the mitmproxy
context. Be careful not to log from this event, which will cause an
infinite loop!
"""
diff --git a/examples/complex/README.md b/examples/complex/README.md
index 77dbe2f5..c53503e4 100644
--- a/examples/complex/README.md
+++ b/examples/complex/README.md
@@ -10,7 +10,7 @@
| mitmproxywrapper.py | Bracket mitmproxy run with proxy enable/disable on OS X |
| nonblocking.py | Demonstrate parallel processing with a blocking script |
| remote_debug.py | This script enables remote debugging of the mitmproxy _UI_ with PyCharm. |
-| sslstrip.py | sslstrip-like funtionality implemented with mitmproxy |
+| sslstrip.py | sslstrip-like functionality implemented with mitmproxy |
| stream.py | Enable streaming for all responses. |
| stream_modify.py | Modify a streamed response body. |
| tcp_message.py | Modify a raw TCP connection |
diff --git a/examples/complex/stream_modify.py b/examples/complex/stream_modify.py
index 5e5da95b..46bdcb78 100644
--- a/examples/complex/stream_modify.py
+++ b/examples/complex/stream_modify.py
@@ -3,7 +3,7 @@ This inline script modifies a streamed response.
If you do not need streaming, see the modify_response_body example.
Be aware that content replacement isn't trivial:
- If the transfer encoding isn't chunked, you cannot simply change the content length.
- - If you want to replace all occurences of "foobar", make sure to catch the cases
+ - If you want to replace all occurrences of "foobar", make sure to catch the cases
where one chunk ends with [...]foo" and the next starts with "bar[...].
"""
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