spy-debugger debugging and packet capture tool

Because I want to debug
the H5 page in the iOS App webview with the windows system , I can find this tool and use the console.log information to debug the webpage in the APP.

About spy-debugger

One-stop page debugging and packet capture tool. Remote debugging of any mobile phone browser page, any mobile phone webview (such as: WeChat, HybridApp, etc.). Support HTTP/HTTPS, no need for USB connection device.

characteristic

1. Page debugging + packet capture
2. Simple operation , no need for USB connection device
3. Support HTTPS.
4, spy-debuggerinternal integration weinre, node-mitmproxy, AnyProxy.
5. Automatically ignore the https request initiated by the native App, and only intercept the https request initiated by the webview. It will not cause any impact on native apps that use SSL pinning technology.
6. Can be used with other proxy tools (AnyProxy is used by default) (Set external proxy)

Use Cases

Page editing mode

Start command:spy-debugger -w true
Insert picture description here

weiner page debugging interface

Insert picture description here

anyproxy capture interface

Insert picture description here

installation

Under Windows

npm install spy-debugger -g

Under Mac

sudo npm install spy-debugger -g

Three minutes to get started

Step 1: Keep the phone and PC on the same network (for example, connect to the same Wi-Fi at the same time)

Step 2: Enter spy-debugger on the command line and open the corresponding address with a browser according to the command line prompt.

Step 3: Set the HTTP proxy of the mobile phone, the proxy IP address is set to the IP address of the PC, and the port is the startup port of spy-debugger (default port: 9888).

Android proxy setting steps: 设置 - WLAN - 长按选中网络 - 修改网络 - 高级 - 代理设置 - 手动
iOS proxy setting steps: 设置 - 无线局域网 - 选中网络 - HTTP代理手动
Step 4: Install the certificate on the phone. Note: The mobile phone must first set up the proxy and then access the http://s.xxx(地址二维码)installation certificate through the (non-WeChat) mobile browser (the mobile phone needs to install the certificate for the first time debugging, and the mobile phone with the installed certificate does not need to install it again). Problem: The iOS 10.3.1above version certificate installation problem

Step 5: Use the mobile browser to visit the page you want to debug.

Custom options

port

(Default port: 9888)

spy-debugger -p 8888

Set up an external proxy (AnyProxy is used by default)

spy-debugger -e http://127.0.0.1:8888

spy-debugger has built-in AnyProxy to provide packet capture function, but it can also be used with other packet capture proxy tools by setting an external proxy, such as Charles and Fiddler.

Set page content to editable mode

This function makes page content modification more intuitive and convenient. (Default: false)

spy-debugger -w true

Internally principle: the need to inject code in the debug page: document.body.contentEditable=true. Pages using the iscroll framework are not currently supported.

Whether to allow weinre to monitor the page loaded by the iframe
(default: false)

spy-debugger -i true

Whether to intercept only https requests initiated by the browser
(default: true)

spy-debugger -b false

The connect request sent by some browsers does not carry the userAgent correctly, and this judgment is sometimes wrong, such as UC browser. This time needs to be set to false. In most cases, it is recommended to enable the default configuration: true. Since a large number of requests from App applications (not WebView) currently use SSL pinning technology, custom certificates will not pass the app's certificate verification.

Whether to allow HTTP caching

(Default: false)

spy-debugger -c true

Original Source: Acridine Egg Yolk

Guess you like

Origin blog.csdn.net/gd81325/article/details/104851088