Created
July 8, 2023 14:19
-
-
Save alufers/33f4324e56468f108a984fd5b6390b37 to your computer and use it in GitHub Desktop.
Run chrome with mitmproxy certificate
This file contains 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
#!/bin/bash | |
MITMPROXY_SPKI=$( | |
cat ~/.mitmproxy/mitmproxy-ca-cert.pem | | |
openssl x509 -inform pem -noout -outform pem -pubkey | | |
openssl pkey -pubin -inform pem -outform der | | |
openssl dgst -sha256 -binary | | |
openssl enc -base64 | |
) | |
CHROME_BINARY="/Applications/Google Chrome.app/Contents/MacOS/Google Chrome" | |
"$CHROME_BINARY" --disable-background-networking \ | |
--no-first-run \ | |
--no-default-browser-check \ | |
--disable-restore-session-state \ | |
--proxy-server="http://localhost:9999" \ | |
--noerrdialogs \ | |
--disable-default-apps \ | |
--disable-translate \ | |
--proxy-bypass-list="<-loopback>" \ | |
--ignore-certificate-errors-spki-list="$MITMPROXY_SPKI" \ | |
https://my-bank.com |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment