Skip to content

Commit

Permalink
Update docs to reflect current shortcut keys for features which have …
Browse files Browse the repository at this point in the history
…been moved into the options menu.
  • Loading branch information
onlywade committed Jul 29, 2015
1 parent d2ae6b6 commit 3346daa
Show file tree
Hide file tree
Showing 7 changed files with 24 additions and 21 deletions.
16 changes: 8 additions & 8 deletions doc-src/features/passthrough.html
Original file line number Diff line number Diff line change
Expand Up @@ -18,18 +18,18 @@
<th width="20%">command-line</th> <td>--ignore regex</td>
</tr>
<tr>
<th>mitmproxy shortcut</th> <td><b>I</b></td>
<th>mitmproxy shortcut</th> <td><b>o</b> then <b>I</b></td>
</tr>
</tbody>
</table>


mitmproxy allows you to specify a regex which is matched against a <code>host:port</code> string (e.g. "example.com:443")
to determine hosts that should be excluded.
to determine hosts that should be excluded.

There are two important quirks to consider:

- **In transparent mode, the ignore pattern is matched against the IP.** While we usually infer the hostname from the
- **In transparent mode, the ignore pattern is matched against the IP.** While we usually infer the hostname from the
Host header if the --host argument is passed to mitmproxy, we do not have access to this information before the SSL
handshake.
- In regular mode, explicit HTTP requests are never ignored.[^explicithttp] The ignore pattern is applied on CONNECT
Expand All @@ -40,9 +40,9 @@

If you just want to ignore one specific domain, there's usually a bulletproof method to do so:

1. Run mitmproxy or mitmdump in verbose mode (-v) and observe the host:port information in the serverconnect
1. Run mitmproxy or mitmdump in verbose mode (-v) and observe the host:port information in the serverconnect
messages. mitmproxy will filter on these.
2. Take the host:port string, surround it with ^ and $, escape all dots (. becomes \\.)
2. Take the host:port string, surround it with ^ and $, escape all dots (. becomes \\.)
and use this as your ignore pattern:

<pre class="terminal">
Expand All @@ -60,16 +60,16 @@
Here are some other examples for ignore patterns:
<pre>
# Exempt traffic from the iOS App Store (the regex is lax, but usually just works):
--ignore apple.com:443
--ignore apple.com:443
# "Correct" version without false-positives:
--ignore '^(.+\.)?apple\.com:443$'

# Ignore example.com, but not its subdomains:
--ignore '^example.com:'

# Ignore everything but example.com and mitmproxy.org:
--ignore '^(?!example\.com)(?!mitmproxy\.org)'

# Transparent mode:
--ignore 17\.178\.96\.59:443
# IP address range:
Expand Down
12 changes: 6 additions & 6 deletions doc-src/features/replacements.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,14 @@
the Response object leaving the Request intact. You control whether the hook
triggers on the request, response or both using the filter pattern. If you need
finer-grained control than this, it's simple to create a script using the
replacement API on Flow components.
replacement API on Flow components.

Replacement hooks are extremely handy in interactive testing of applications.
For instance you can use a replace hook to replace the text "XSS" with a
complicated XSS exploit, and then "inject" the exploit simply by interacting
with the application through the browser. When used with tools like Firebug and
mitmproxy's own interception abilities, replacement hooks can be an amazingly
flexible and powerful feature.
flexible and powerful feature.


## On the command-line
Expand Down Expand Up @@ -52,9 +52,9 @@

## Interactively

The _R_ shortcut key in mitmproxy lets you add and edit replacement hooks using
a built-in editor. The context-sensitive help (_h_) has complete usage
information.
The _R_ shortcut key in the mitmproxy options menu (_o_) lets you add and edit
replacement hooks using a built-in editor. The context-sensitive help (_?_) has
complete usage information.

<table class="table">
<tbody>
Expand All @@ -68,7 +68,7 @@
</td>
</tr>
<tr>
<th>mitmproxy shortcut</th> <td><b>R</b></td>
<th>mitmproxy shortcut</th> <td><b>o</b> then <b>R</b></td>
</tr>
</tbody>
</table>
2 changes: 1 addition & 1 deletion doc-src/features/setheaders.html
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
</td>
</tr>
<tr>
<th>mitmproxy shortcut</th> <td><b>H</b></td>
<th>mitmproxy shortcut</th> <td><b>o</b> then <b>H</b></td>
</tr>
</tbody>
</table>
8 changes: 4 additions & 4 deletions doc-src/features/sticky.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
through mitmproxy as if they were unauthenticated, because mitmproxy will
automatically add the session tracking cookie to requests. Among other things,
this lets you script interactions with authenticated resources (using tools
like wget or curl) without having to worry about authentication.
like wget or curl) without having to worry about authentication.

Sticky cookies are especially powerful when used in conjunction with [client
replay](@!urlTo("clientreplay.html")!@) - you can record the authentication
Expand All @@ -27,7 +27,7 @@
</td>
</tr>
<tr>
<th>mitmproxy shortcut</th> <td><b>t</b></td>
<th>mitmproxy shortcut</th> <td><b>o</b> then <b>t</b></td>
</tr>
</tbody>
</table>
Expand All @@ -39,7 +39,7 @@
__Authorization__ headers are simply replayed to the server once they have been
seen. This is enough to allow you to access a server resource using HTTP Basic
authentication through the proxy. Note that __mitmproxy__ doesn't (yet) support
replay of HTTP Digest authentication.
replay of HTTP Digest authentication.

<table class="table">
<tbody>
Expand All @@ -52,7 +52,7 @@
</td>
</tr>
<tr>
<th>mitmproxy shortcut</th> <td><b>u</b></td>
<th>mitmproxy shortcut</th> <td><b>o</b> then <b>A</b></td>
</tr>
</tbody>
</table>
Expand Down
2 changes: 1 addition & 1 deletion doc-src/features/tcpproxy.html
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
<th width="20%">command-line</th> <td>--tcp HOST</td>
</tr>
<tr>
<th>mitmproxy shortcut</th> <td><b>T</b></td>
<th>mitmproxy shortcut</th> <td><b>o</b> then <b>T</b></td>
</tr>
</tbody>
</table>
Expand Down
3 changes: 3 additions & 0 deletions doc-src/features/upstreamcerts.html
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,8 @@
<tr>
<th width="20%">command-line</th> <td>--no-upstream-cert</td>
</tr>
<tr>
<th>mitmproxy shortcut</th> <td><b>o</b> then <b>U</b></td>
</tr>
</tbody>
</table>
2 changes: 1 addition & 1 deletion doc-src/mitmproxy.html
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@
- Editing request or response headers (_e_ for edit, then _h_ for headers in flow view)
- Editing a query string (_e_ for edit, then _q_ for query in flow view)
- Editing a URL-encoded form (_e_ for edit, then _f_ for form in flow view)
- Editing replacement patterns (_R_ globally)
- Editing replacement patterns (_o_ for options, then _R_ for Replacement Patterns)

If there is is no data, an empty editor will be started to let you add some.
Here is the editor showing the headers from a request:
Expand Down

0 comments on commit 3346daa

Please sign in to comment.