mitmproxy使用
Posted by 付辉 on Friday, July 6, 2018 共494字介绍一款非常好用的抓包工具,官网地址:https://www.mitmproxy.org。实际上,在调试苹果IAP
支付时,始终没有抓成功过,反而因为设置了代理,导致苹果沙盒用户
无法成功支付。它名字的全拼是Man-in-the-middle-proxy
,代表中间人攻击。
常用的快捷键
- 在列表界面,按
回车
进入详情界面 - 在详情界面,按
q
返回列表界面 - 在详情界面,按
tab
键在Request
,Response
,Detail
三个tab
之间切换。按j
,k
可以滚动查看详情. - 在列表界面,按
G
跳到最新一个请求 - 在列表界面,按
g
跳到第一个请求 - 在列表界面,按
d
删除当前选中的请求,按D
恢复刚才删除的请求 - 在列表界面,按
z
清空请求列表
常用的过滤表达式
列表界面,按f
进入过滤模式。详细的过滤表达式,可以查看:Filter expressions
。
~h regex Header
~u regex URL
~m regex Method
原理
- Subject Alternative Name:is an extension to X.509 that allows various values to be associated with a security certificate using a subjectAltName field. These values are called Subject Alternative Names (SANs). Names include
- Server Name Indication: is an extension to the TLS computer networking protocol by which a client indicates which hostname it is attempting to connect to at the start of the handshaking process. This allows a server to present multiple certificates on the same IP address and TCP port number and hence allows multiple secure (HTTPS) websites (or any other service over TLS) to be served by the same IP address without requiring all those sites to use the same certificate.