Skip to content

Instantly share code, notes, and snippets.

@mzdluo123
Last active June 5, 2022 16:16
Show Gist options
  • Save mzdluo123/e933db8fe1ac8a0781e6d27a0de149a6 to your computer and use it in GitHub Desktop.
Save mzdluo123/e933db8fe1ac8a0781e6d27a0de149a6 to your computer and use it in GitHub Desktop.
Danbooru mitmproxy

使用mitmproxy绕过sni检测直接连接danbooru

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