Mitmweb 参数配置

Mitmweb所有可选参数

usage: mitmweb [options]

optional arguments:
  -h, --help            show this help message and exit
  --version             show version number and exit
  --options             Show all options and their default values
  --commands            Show all commands and their signatures
  --set option[=value]  Set an option. When the value is omitted, booleans are set to true, strings and integers are
                        set to None (if permitted), and sequences are emptied. Boolean values can be true, false or
                        toggle.
  -q, --quiet           Quiet.
  -v, --verbose         Increase log verbosity.
  --mode MODE, -m MODE  Mode can be "regular", "transparent", "socks5", "reverse:SPEC", or "upstream:SPEC". For
                        reverse and upstream proxy modes, SPEC is host specification in the form of
                        "http[s]://host[:port]".
  --no-anticache
  --anticache           Strip out request headers that might cause the server to return 304-not-modified.
  --no-showhost
  --showhost            Use the Host header to construct URLs for display.
  --rfile PATH, -r PATH
                        Read flows from file.
  --scripts SCRIPT, -s SCRIPT
                        Execute a script. May be passed multiple times.
  --stickycookie FILTER
                        Set sticky cookie filter. Matched against requests.
  --stickyauth FILTER   Set sticky auth filter. Matched against requests.
  --save-stream-file PATH, -w PATH
                        Stream flows to file as they arrive. Prefix path with + to append.
  --no-anticomp
  --anticomp            Try to convince servers to send us un-compressed data.

Mitmweb:
  --no-web-open-browser
  --web-open-browser    Start a browser.
  --web-port PORT       Web UI port.
  --web-host HOST       Web UI host.

Proxy Options:
  --listen-host HOST    Address to bind proxy to.
  --listen-port PORT, -p PORT
                        Proxy service port.
  --no-server, -n
  --server              Start a proxy server. Enabled by default.
  --ignore-hosts HOST   Ignore host and forward all traffic without processing it. In transparent mode, it is
                        recommended to use an IP address (range), not the hostname. In regular mode, only SSL traffic
                        is ignored and the hostname should be used. The supplied value is interpreted as a regular
                        expression and matched on the ip or the hostname. May be passed multiple times.
  --allow-hosts HOST    Opposite of --ignore-hosts. May be passed multiple times.
  --tcp-hosts HOST      Generic TCP SSL proxy mode for all hosts that match the pattern. Similar to --ignore-hosts,
                        but SSL connections are intercepted. The communication contents are printed to the log in
                        verbose mode. May be passed multiple times.
  --upstream-auth USER:PASS
                        Add HTTP Basic authentication to upstream proxy and reverse proxy requests. Format:
                        username:password.
  --proxyauth SPEC      Require proxy authentication. Format: "username:pass", "any" to accept any user/pass
                        combination, "@path" to use an Apache htpasswd file, or
                        "ldap[s]:url_server_ldap:dn_auth:password:dn_subtree" for LDAP authentication.
  --no-rawtcp
  --rawtcp              Enable/disable experimental raw TCP support. TCP connections starting with non-ascii bytes are
                        treated as if they would match tcp_hosts. The heuristic is very rough, use with caution.
                        Disabled by default.
  --no-http2
  --http2               Enable/disable HTTP/2 support. HTTP/2 support is enabled by default.

SSL:
  --certs SPEC          SSL certificates 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, else the default key in the conf dir is used. The PEM file
                        should contain the full certificate chain, with the leaf certificate as the first entry. May
                        be passed multiple times.
  --cert-passphrase PASS
                        Passphrase for decrypting the private key provided in the --cert option.
  --no-ssl-insecure
  --ssl-insecure, -k    Do not verify upstream server SSL/TLS certificates.
  --key-size KEY_SIZE   TLS key size for certificates and CA.

Client Replay:
  --client-replay PATH, -C PATH
                        Replay client requests from a saved file. May be passed multiple times.

Server Replay:
  --server-replay PATH, -S PATH
                        Replay server responses from a saved file. May be passed multiple times.
  --no-server-replay-kill-extra
  --server-replay-kill-extra
                        Kill extra requests during replay.
  --no-server-replay-nopop
  --server-replay-nopop
                        Don't remove flows from server replay state after use. This makes it possible to replay same
                        response multiple times.
  --no-server-replay-refresh
  --server-replay-refresh
                        Refresh server replay responses by adjusting date, expires and last-modified headers, as well
                        as adjusting cookie expiration.

Map Remote:
  --map-remote PATTERN, -M PATTERN
                        Map remote resources to another remote URL using a pattern of the form "[/flow-filter]/url-
                        regex/replacement", where the separator can be any character. May be passed multiple times.

Map Local:
  --map-local PATTERN   Map remote resources to a local file using a pattern of the form "[/flow-filter]/url-
                        regex/file-or-directory-path", where the separator can be any character. May be passed
                        multiple times.

Modify Body:
  --modify-body PATTERN, -B PATTERN
                        Replacement pattern of the form "[/flow-filter]/regex/[@]replacement", where the separator can
                        be any character. The @ allows to provide a file path that is used to read the replacement
                        string. May be passed multiple times.

Modify Headers:
  --modify-headers PATTERN, -H PATTERN
                        Header modify pattern of the form "[/flow-filter]/header-name/[@]header-value", where the
                        separator can be any character. The @ allows to provide a file path that is used to read the
                        header value string. An empty header-value removes existing header-name headers. May be passed
                        multiple times.

Filters:
  See help in mitmproxy for filter expression syntax.

  --intercept FILTER    Intercept filter expression.

Commands

# Start an isolated instance of Chrome that points to the currently
# running proxy.
browser.start

commands.history.add command

commands.history.clear

commands.history.filter prefix

# Get the entire command history.
commands.history.get  -> str[]

commands.history.next  -> str

commands.history.prev  -> str

# Cut data from a set of flows. Cut specifications are attribute paths
# from the base of the flow object, with a few conveniences - "port"
# and "host" retrieve parts of an address tuple, ".header[key]"
# retrieves a header value. Return values converted to strings or
# bytes: SSL certificates are converted to PEM format, bools are "true"
# or "false", "bytes" are preserved, and all other values are
# converted to strings.
cut flows cuts -> data[][]

# Send cuts to the clipboard. If there are multiple flows or cuts, the
# format is UTF-8 encoded CSV. If there is exactly one row and one
# column, the data is written to file as-is, with raw bytes preserved.
cut.clip flows cuts

# Save cuts to file. If there are multiple flows or cuts, the format
# is UTF-8 encoded CSV. If there is exactly one row and one column,
# the data is written to file as-is, with raw bytes preserved. If the
# path is prefixed with a "+", values are appended if there is an
# existing file.
cut.save flows cuts path

# Clear the event log.
eventstore.clear

# Export a flow to the system clipboard.
export.clip format flow

# Export a flow to path.
export.file format flow path

# Return a list of the supported export formats.
export.formats  -> str[]

# Decode flows.
flow.decode flows part

# Encode flows with a specified encoding.
flow.encode flows part encoding

# The possible values for an encoding specification.
flow.encode.options  -> str[]

# Toggle flow encoding on and off, using deflate for encoding.
flow.encode.toggle flows part

# Kill running flows.
flow.kill flows

# Mark flows.
flow.mark flows boolean

# Toggle mark for flows.
flow.mark.toggle flows

# Resume flows if they are intercepted.
flow.resume flows

# Revert flow changes.
flow.revert flows

# Quickly set a number of common values on flows.
flow.set flows attr value

flow.set.options  -> str[]

# Load options from a file.
options.load path

# Reset all options to defaults.
options.reset

# Reset one option to its default value.
options.reset.one name

# Save options to a file.
options.save path

readfile.reading  -> bool

# Add flows to the replay queue, skipping flows that can't be replayed.
replay.client flows

# Approximate number of flows queued for replay.
replay.client.count  -> int

# Load flows from file, and add them to the replay queue.
replay.client.file path

# Clear the replay queue.
replay.client.stop

# Replay server responses from flows.
replay.server flows

replay.server.count  -> int

replay.server.file path

# Stop server replay.
replay.server.stop

# Save flows to a file. If the path starts with a +, flows are
# appended to the file, otherwise it is over-written.
save.file flows path

# Run a script on the specified flows. The script is configured with
# the current options and all lifecycle events for each flow are
# simulated. Note that the load event is not invoked.
script.run flows path

# Set an option. When the value is omitted, booleans are set to true,
# strings and integers are set to None (if permitted), and sequences
# are emptied. Boolean values can be true, false or toggle.
# Multiple values are concatenated with a single space.
set option value

# Clears both the store and view.
view.clear

# Clears only the unmarked flows.
view.clear_unmarked

# Sets the current view filter.
view.filter.set filter_expr

view.flows.create method url

# Duplicates the specified flows, and sets the focus to the first
# duplicate.
view.flows.duplicate flows

# Load flows into the view, without processing them with addons.
view.flows.load path

# Removes the flow from the underlying store and the view.
view.flows.remove flows

# Resolve a flow list specification to an actual list of flows.
view.flows.resolve flow_spec -> flow[]

# Go to a specified offset. Positive offests are from the beginning of
# the view, negative from the end of the view, so that 0 is the first
# flow, -1 is the last flow.
view.focus.go offset

# Set focus to the next flow.
view.focus.next

# Set focus to the previous flow.
view.focus.prev

# Returns the current view order.
view.order  -> str

# Choices supported by the view_order option.
view.order.options  -> str[]

view.order.reverse boolean

# Sets the current view order.
view.order.set order_key

# Is this 0 <= index < len(self)?
view.properties.inbounds index -> bool

# Returns view length.
view.properties.length  -> int

# Returns true if view is in marked mode.
view.properties.marked  -> bool

# Toggle whether to show marked views only.
view.properties.marked.toggle

# Get a value from the settings store for the specified flow.
view.settings.getval flow key default -> str

# Set a value in the settings store for the specified flows.
view.settings.setval flows key value

# Toggle a boolean value in the settings store, setting the value to
# the string "true" or "false".
view.settings.setval.toggle flows key
  • 0
    点赞
  • 3
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

苹果维修

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值