SniffMaster Interceptor User Guide
SniffMaster allows you to intercept and modify network requests and responses, including their full content, such as request URL, headers, and body. By writing JavaScript, you can make modifications, replacements, and set rules for requests.
Open Interceptor Log
On the right side of the proxy packet capture interface, there is an interceptor icon resembling a plug. Double-click the interceptor icon to open the interceptor log interface, where you can view the status and, if the interceptor is enabled, see the interception logs.

Open Interceptor Editor
In the interceptor log interface, click Edit Interceptor to access the interceptor editing functionality.

Edit Interceptor Code
The interceptor includes a default code example demonstrating the basic framework. You need to modify this according to your specific needs. The interceptor code is written in JavaScript, and the names of the three functions and their parameters cannot be changed; only the internal logic of the functions can be modified.
handleRequest- Request interception, where the logic for modifying the request is written.handleResponse- Response interception, where the logic for modifying the response data is written.filterUrl- Intercept URL rules, listing the URLs to be intercepted (supports wildcards).
The interceptor must at least contain the following code, which is an empty interceptor that does nothing.
1function handleRequest(request) {
2 return request;
3}
4
5function handleResponse(response) {
6 return response;
7}
8
9function filterUrl() {
10 return [];
11}
A simple interceptor example is shown below. This interceptor intercepts Google requests and logs messages when sending or receiving data.
function handleRequest(request) {
console.log("Preparing to send request to " + request.URL);
return request;
}
function handleResponse(response) {
console.log("Received response from " + response.URL);
return response;
}
function filterUrl() {
return ["https://www.google.com/*"];
}
Interceptor - request Object
The request object contains all the data of the request about to be sent to the server. You can modify this data to alter what is sent to the server. The request object includes the following properties:
URL- The request URL. If you want to redirect to another address, simply modify this value.Header- The request headers, represented as a key-value object.Body- The request body data to be sent to the server.IsBase64Body- Indicates whether the body is base64-encoded before being sent to the interceptor. If the data is binary, SniffMaster encodes it as a base64 string and assigns it to theBody.IsBase64Bodyis set totrue. If the body is plain text,Bodycontains the original string andIsBase64Bodyis set tofalse. To modify the base64-encoded body, ensure the body data andIsBase64Bodyare correctly matched.
Interceptor - response Object
The response object contains all the information returned by the server. You can modify this to alter the data sent to the final target program. The response object has similar properties to the request object, with the addition of the StatusCode field:
StatusCode- The response status code.URL- The response URL. If you want to redirect to another address, modify this value.Header- The response headers, represented as a key-value object.Body- The data returned by the server, which will be sent to the software.IsBase64Body- Indicates whether the body is base64-encoded before being sent to the interceptor. If the returned data is binary, SniffMaster encodes it as a base64 string and assigns it to theBody.IsBase64Bodyis set totrue. If the response is plain text, theBodycontains the original string andIsBase64Bodyis set tofalse. Ensure that the body data andIsBase64Bodyare properly matched when modifying a base64-encoded body.
- iOS 抓包工具有哪些?开发、测试与安全场景的实战选择
- iOS 抓包软件哪款更适合团队?工具职责、实战流程与替代方案解析
- iOS 设备如何抓包,从入门到工程化排查的可执行指南(抓包、HTTPS抓包、Charles、tcpdump、Wireshark)
- iOS 手机端抓包工具选型与实战攻略
- iOS 手机抓包 App 怎么选与实战流程(抓包、HTTPS抓包、Charles、tcpdump、Wireshark)
- App HTTPS 抓包 工程化排查与工具组合实战
- iPhone HTTPS 抓包,从无法抓包到定位问题的流程(Charles/tcpdump/Wireshark/Sniffmaster)
- HTTPS 请求抓包,从原理到落地排查的工程化指南(Charles / tcpdump / Wireshark / Sniffmaster)
- iOS HTTPS 抓包,从原理到落地排查的工程化方法(Charles / tcpdump / Sniffmaster)
- iOS 抓不到包怎么办?工程化排查与替代抓包方案(抓包/HTTPS/Charles代理/tcpdump)
- Fiddler 抓不到包怎么办?从排查到替代方案的工程实战
- Charles 抓不到包怎么办?一线工程师的排查与真机抓包流程
- iOS 设备 抓包,iOS实机抓包到问题闭环的工程化实战
- 网站抓包,工程化抓取、分析与真机取证实战
- 如何排查“链接 HTTPS”问题,工程化思路与iOS抓包流程
- iOS 抓包工具怎么选?开发者的实战经验与选择指南
- iOS 抓包工具有哪些?全面盘点主流工具与功能对比分析
- 开始使用
- proxy sniff https
- Capture iOS TCP Packets
- Crack HTTPS Sniffing
- Start
- 嗅探大师android版
- 嗅探大师拦截器详细教程
- 嗅探大师常见问题
- 代理抓包
- 数据流抓包
- HTTPS暴力抓包