使用mitmproxy绕过sni检测直接连接danbooru
Last active
June 5, 2022 16:16
-
-
Save mzdluo123/e933db8fe1ac8a0781e6d27a0de149a6 to your computer and use it in GitHub Desktop.
Danbooru mitmproxy
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from mitmproxy import ctx | |
from mitmproxy.proxy.server_hooks import ServerConnectionHookData | |
''' | |
使用 mitmproxy -s main.py 启动代理 | |
然后再mitm.it安装证书 | |
''' | |
class Danbooru: | |
def server_connect(self, data: ServerConnectionHookData): | |
ctx.log.debug(data.server) | |
if data.server.address[0] == "danbooru.donmai.us": | |
data.server.address = ("donmai.us", 443) | |
ctx.log.info("hook connection success!") | |
addons = [ | |
Danbooru() | |
] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment