File: pathod.1.md

package info (click to toggle)
mitmproxy 0.18.2-6%2Bdeb9u2
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 37,444 kB
  • sloc: python: 33,213; makefile: 167; ansic: 68; sh: 48
file content (153 lines) | stat: -rw-r--r-- 3,953 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
% pathod(1)
%
% November 2016

# NAME

pathod - a pathological HTTP/S daemon

# SYNOPSIS

pathod [-h] [\--version] [-p *PORT*] [-l *ADDRESS*] [-a *ANCHOR*]\
\ \ \ \ \ \ \ [-c *CRAFTANCHOR*] [\--confdir *CONFDIR*] [-d *STATICDIR*] [-D]\
\ \ \ \ \ \ \ [-t *TIMEOUT*] [\--limit-size *SIZELIMIT*] [\--nohang] [\--nocraft]\
\ \ \ \ \ \ \ [\--webdebug] [-s] [\--cn *CN*] [-C] [\--cert *SPEC*]\
\ \ \ \ \ \ \ [\--ciphers *CIPHERS*] [\--san *SAN*]\
\ \ \ \ \ \ \ [\--ssl-version {`all`|`TLSv1_2`|`secure`|`TLSv1_1`|`TLSv1`|`SSLv3`|`SSLv2`}]\
\ \ \ \ \ \ \ [-e] [-f *LOGFILE*] [-q] [-r] [-x] [\--http2-framedump]

# DESCRIPTION

`pathod` is a pathological HTTP daemon designed to let you craft almost
any conceivable HTTP response, including ones that creatively violate the
standards. HTTP responses are specified using a small, terse language which
`pathod` shares with its evil twin, `pathoc`. To start playing with pathod,
fire up the daemon:

```
$ pathod
```

By default, the service listens on port `9999` of `localhost`, and the
default crafting anchor point is the path `/p/`. Anything after this URL
prefix is treated as a response specifier. So, hitting the following URL
will generate an HTTP 200 response with 100 bytes of random data:

```
http://localhost:9999/p/200:b@100
```

See the
[language documentation](http://docs.mitmproxy.org/en/latest/pathod/language.html#language)
to get (much) fancier.

# OPTIONS

## Optional Arguments:

-h, \--help
:   Show this help message and exit.

\--version
:   Show program's version number and exit.

-p *PORT*
:   Port. Specify `0` to pick an arbitrary empty port. (Default: `9999`)

-l *ADDRESS*
:   Listening address. (Default: `127.0.0.1`)

-a *ANCHOR*
:   Add an anchor. Specified as a string with the form `pattern=spec` or
    `pattern=filepath`, where pattern is a regular expression.

-c *CRAFTANCHOR*
:   URL path specifying prefix for URL crafting commands. (Default: `/p/`)

\--confdir *CONFDIR*
:   Configuration directory. (Default: `~/.mitmproxy`)

-d *STATICDIR*
:   Directory for static files.

-D
:   Daemonize.

-t *TIMEOUT*
:   Connection timeout.

\--limit-size *SIZELIMIT*
:   Size limit of served responses. Understands size suffixes, e.g. 100k.

\--nohang
:   Disable pauses during crafted response generation.

\--nocraft
:   Disable response crafting. If anchors are specified, they still work.

\--webdebug
:   Debugging mode for the web app (dev only).

## SSL:

-s
:   Run in HTTPS mode.

\--cn *CN*
:   CN for generated SSL certs. (Default: `pathod.net`)

-C
:   Don't expect SSL after a CONNECT request.

\--cert *SPEC*
:   Add an SSL certificate. SPEC is of the form `"[domain=]path"`. The domain
    may include a wildcard, and is equal to `"*"` if not specified. The file
    at path is a certificate in PEM format. If a private key is included
    in the PEM, it is used, otherwise the default key in the conf dir is
    used. Can be passed multiple times.

\--ciphers *CIPHERS*
:   SSL cipher specification.

\--san *SAN*
:   Subject Altnernate Name to add to the server certificate. May be passed
    multiple times.

\--ssl-version {`all`|`TLSv1_2`|`secure`|`TLSv1_1`|`TLSv1`|`SSLv3`|`SSLv2`}
:   Set supported SSL/TLS versions. `SSLv2`, `SSLv3` and `all` are
    INSECURE. Defaults to `secure`, which is TLS1.0+.

## Controlling Logging:

Some of these options expand generated values for logging. If you're
generating large data, use them with caution.

-e
:   Explain responses.

-f *LOGFILE*
:   Log to file.

-q
:   Log full request.

-r
:   Log full response.

-x
:   Log request/response in hexdump format.

\--http2-framedump
:   Output all received & sent HTTP/2 frames.

# AUTHORS

`pathod` was written by Aldo Cortesi.

This manual page was written for the Debian GNU/Linux system, but its use
elsewhere is encouraged.

# SEE ALSO

`pathod` documentation and examples are available online at
<http://docs.mitmproxy.org/en/latest/pathod/intro.html#pathod>.