All Projects → hudaming1 → jmitm

hudaming1 / jmitm

Licence: other
Java版本的mitmproxy,对本地浏览器所有的Http(s)请求和响应进行拦截并「重制」;也可充当轻量级B/S版抓包软件;

Programming Languages

java
68154 projects - #9 most used programming language

Projects that are alternatives of or similar to jmitm

Whistle
HTTP, HTTP2, HTTPS, Websocket debugging proxy
Stars: ✭ 9,683 (+50863.16%)
Mutual labels:  charles, fiddler
Stubmatic
Mock HTTP calls without coding. Designed specially for testing and testers.
Stars: ✭ 118 (+521.05%)
Mutual labels:  mock, https
mps
MPS is a high-performance HTTP(S) proxy library that supports forward proxies, reverse proxies, man-in-the-middle proxies, tunnel proxies, Websocket proxies. MPS 是一个高性能HTTP(s)中间代理库,它支持正向代理、反向代理、中间人代理、隧道代理、Websocket代理
Stars: ✭ 64 (+236.84%)
Mutual labels:  https-proxy, mitmproxy
fiddler2jmeter
JMeter脚本录制工具:将Fiddler/Charles转换为JMeter 4.0以上的脚本,并支持过滤功能 JMeter script recording tool: converts Fiddler / Charles into scripts above JMeter 4.0, and supports filtering function
Stars: ✭ 20 (+5.26%)
Mutual labels:  charles, fiddler
Python Mocket
a socket mock framework - for all kinds of socket animals, web-clients included
Stars: ✭ 209 (+1000%)
Mutual labels:  mock, https
Go Mitmproxy
mitmproxy implemented with golang. 用 Golang 实现的中间人攻击(Man-in-the-middle),解析、监测、篡改 HTTP/HTTPS 流量。
Stars: ✭ 61 (+221.05%)
Mutual labels:  https, mitmproxy
Wormholy
iOS network debugging, like a wizard 🧙‍♂️
Stars: ✭ 2,010 (+10478.95%)
Mutual labels:  https, charles
Mastermind
Man in the middle testing
Stars: ✭ 341 (+1694.74%)
Mutual labels:  mock, mitmproxy
Interceptors
Low-level HTTP/HTTPS/XHR/fetch request interception library.
Stars: ✭ 100 (+426.32%)
Mutual labels:  mock, https
Bypass
Bypass provides a quick way to create a custom plug that can be put in place instead of an actual HTTP server to return prebaked responses to client requests.
Stars: ✭ 731 (+3747.37%)
Mutual labels:  mock, https
WormholyForObjectiveC
Network debugging made easy,This network debugging tool is developed based on the swift version of Wormholy.
Stars: ✭ 21 (+10.53%)
Mutual labels:  https, charles
C-Sharp-Proxy-Server
A proxy server built with c# can be both normal and MITM Proxy
Stars: ✭ 86 (+352.63%)
Mutual labels:  https-proxy, mitmproxy
HttpProxy
JAVA实现的IP代理池,支持HTTP与HTTPS两种方式
Stars: ✭ 37 (+94.74%)
Mutual labels:  https, https-proxy
umi-dva-typescript-mock
基于umi + dva + typescript + mock + antd的react框架,内置PWA
Stars: ✭ 17 (-10.53%)
Mutual labels:  mock
PassivesScan
《被动扫描资源汇总》
Stars: ✭ 27 (+42.11%)
Mutual labels:  mitmproxy
httpit
A rapid http(s) benchmark tool written in Go
Stars: ✭ 156 (+721.05%)
Mutual labels:  https
TLS-Redirection
TLS Redirection
Stars: ✭ 109 (+473.68%)
Mutual labels:  https
pki
Certificate Authority management suite
Stars: ✭ 23 (+21.05%)
Mutual labels:  https
vision
Mock request on the flight
Stars: ✭ 17 (-10.53%)
Mutual labels:  mock
miz
🎯 Generate fake data, Just like a person.
Stars: ✭ 24 (+26.32%)
Mutual labels:  mock

概述

简单说就是你可以对自己浏览器的所有「请求」和「响应」进行拦截,并通过「Java代码方式」进行「重制」。 基于jmitm,你可以:

根据Request重制Request
例如将「wiredog.com」重定向到「localhost:8080」,等效于配置浏览器级别的host: wiredog.com 127.0.0.1:8080

// 将wiredog.com重定向到localhost:8080
proxy.add(new CatchRequest().eval(request -> {
    // 判断请求域名是wiredog.com
    return "wiredog.com".equals(request.host());
}).rebuildRequest(request -> {
    // 如果命中Request,则将请求实际转发到localhost:8080
    return request.header("Host", "localhost:8080");
}).mock());

根据Request重制Response
对百度首页注入一段JS代码(根据请求拦截响应报文,并追加一段代码)

proxy.add(new CatchRequest().eval(request -> {
    // 如果访问的是百度首页
    return "www.baidu.com".equals(request.host()) && "/".equals(request.uri());
}).rebuildResponse(response -> {
    // 如果命中百度首页,则将以下JS代码追加到网页HTML的末尾,通过查看浏览器网页源代码也会发现在末尾处多了一段JS
    // 注入的JS代码
    String json = "<!--add by wiretigher--><script type='text/javascript'>alert('Wiredog say hello');</script>";
    // 因为响应头是gzip进行压缩,因此无法直接将ASCII串追加到内容末尾,需要先将原响应报文解压,在将JS追加到末尾
    String outBody = new String(CodecFactory.create("gzip").decompress(response.body())) + json;
    // 解压后为了省事,就不再进行压缩
    return response.removeHeader("Content-Encoding").body(outBody.getBytes());
}).mock());

根据Request Mock Response
拦截百度首页Logo,不做真实转发,直接读取本地GoogleLogo文件作为Response,百度首页的Logo变为本地Google的图片

proxy.add(new CatchRequest().eval(request -> {
    // 如果域名是baidu,访问的图片是百度的Logo(第一个图片是PC上的,后两个路径是移动端的Logo)
    return "www.baidu.com".equals(request.host()) &&("/img/PCtm_d9c8750bed0b3c7d089fa7d55720d6cf.png".equals(request.uri()) || "/img/flexible/logo/pc/result.png".equals(request.uri()) || "/img/flexible/logo/pc/[email protected]".equals(request.uri()));
}).mockResponse(httpRequest -> {
    // 如果命中请求,则不会将请求转发到百度服务器,而直接读取本地Google图片作为Response返回。
    HttpResponse response = new HttpResponse();
    byte[] googleLogo = readFile("/mock/google.png");
    return response.body(googleLogo).header("Content-Type", "image/gif");
}).mock());

根据Response重制Response
暂时No Case...

Quick Start

1.git clone https://github.com/hudaming1/wiredog.git
2.启动 WiredogServerRun.java (默认端口52007)
3.访问localhost:8080进入控制台
4.点击控制台单「Download Cert」按钮下载并安装CA(如果需要卸载,在证书库中搜索Wiredog删除即可)
🌟Mac系统导入后,还需要手动将CA进行授信。
5.访问HTTPS网页,当控制台显示出HTTPS请求时,即可对HTTP请求响应进行重制

其他

内置PostMan

请求重访功能:对于抓到的HTTP请求,在控制台中不仅可以查看请求和响应结果,也可以实时进行修改并进行再次发送,等效于实现集成Fillder和PostMan。
<补充示例>

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].