【github】http://www.liu12fei08fei.top/blog/14capture.htmlhtml
抓包工具介绍git
whistlegithub
最新版本的whistle支持三种等价的命令whistle、w二、wproxyweb
启动whistlenpm
$ w2 startjson
重启whsitle后端
$ w2 restart浏览器
中止whistle服务器
$ w2 stopcookie
调试模式启动whistle(主要用于查看whistle的异常及插件开发)
$ w2 run
更新whistle
# 如下命令均可以更新whistle
$ npm install -g whistle
# or
$ npm update -g whistle
# or
$ npm install -g whistle --registry=https://registry.npm.taobao.org
# or
$ npm update -g whistle --registry=https://registry.npm.taobao.org
$ w2 restart
whistle界面操做快捷键
Ctrl + X(Mac用Command + X):
Ctrl + D(Mac用Command + D):
Charles
Charles主要功能
代理基本设置
调出端口设置页面
菜单栏操做 Proxy->Proxy Settings...
设置端口
选中Proxies面板->HTTP Proxy 下的Port: 后填入 8888 -> 点击OK完成
设置手机代理
打开WLAN设置->进入连接的WiFi的设置。代理处选择手动->主机名设置为安装Charles的主机的IP->端口输入Charles设置的端口号->点击肯定完成(苹果手机返回就行)主机IP,在终端打 ifconfig ,找到相似 192.168.199.248
抓取https请求设置
手机安装证书
菜单栏操做 Help->SSL Proxing->Install Charles Root Certificate on a Mobile Device or Remote Browser弹出下文中的资料,在手机浏览器中输入,chls.pro/ssl,安装相应证书
Configure your device to use Charles as its HTTP proxy on 192.168.199.248:1208, then browse to chls.pro/ssl to download and install the certificate.
Charles设置代理https
菜单栏操做 Proxy->SSL Proxying Settings... 开启SSL代理->输入要抓取https接口的域名->OK
若是还抓取不到https
若是还抓取不到
分析抓取的数据包
Charles 主要提供两种查看封包的视图
Charles弱网模拟
内容替换