aboutsummaryrefslogtreecommitdiffstats
path: root/doc-src/mitmdump.html
diff options
context:
space:
mode:
authorAldo Cortesi <aldo@nullcube.com>2011-08-05 13:26:39 +1200
committerAldo Cortesi <aldo@nullcube.com>2011-08-05 13:26:39 +1200
commitcd0e2f18e6626f5d02ab749a001934a016eee966 (patch)
treee81b68b5224a3b9f440fc834cee990735f39fe19 /doc-src/mitmdump.html
parent89a58d7e303f00e4ed7572b60db6a2073804c4a1 (diff)
downloadmitmproxy-cd0e2f18e6626f5d02ab749a001934a016eee966.tar.gz
mitmproxy-cd0e2f18e6626f5d02ab749a001934a016eee966.tar.bz2
mitmproxy-cd0e2f18e6626f5d02ab749a001934a016eee966.zip
First draft of scripting docs.
Diffstat (limited to 'doc-src/mitmdump.html')
-rw-r--r--doc-src/mitmdump.html20
1 files changed, 15 insertions, 5 deletions
diff --git a/doc-src/mitmdump.html b/doc-src/mitmdump.html
index 4d0683ea..1ca5a020 100644
--- a/doc-src/mitmdump.html
+++ b/doc-src/mitmdump.html
@@ -8,28 +8,36 @@ documentation.
## Example: saving traffic
- mitmdump -w outfile
+<pre class="terminal">
+mitmdump -w outfile
+</pre>
Start up mitmdump in proxy mode, and write all traffic to __outfile__.
## Example: client replay
- mitmdump -nc outfile
+<pre class="terminal">
+mitmdump -nc outfile
+</pre>
Start mitmdump without binding to the proxy port (_-n_), then replay all
requests from outfile (_-c filename_). Flags combine in the obvious way, so
you can replay requests from one file, and write the resulting flows to
another:
- mitmdump -nc srcfile -w dstfile
+<pre class="terminal">
+mitmdump -nc srcfile -w dstfile
+</pre>
See the [Client-side Replay](@!urlTo("clientreplay.html")!@) section for more information.
## Example: running a script
- mitmdump -s examples/add_header.py
+<pre class="terminal">
+mitmdump -s examples/add_header.py
+</pre>
This runs the __add_header.py__ example script, which simply adds a new header
to all responses.
@@ -37,7 +45,9 @@ to all responses.
## Example: scripted data transformation
- mitmdump -ns examples/add_header.py -r srcfile -w dstfile
+<pre class="terminal">
+mitmdump -ns examples/add_header.py -r srcfile -w dstfile
+</pre>
This command loads flows from __srcfile__, transforms it according to the
specified script, then writes it back to __dstfile__.