Last active
August 17, 2018 23:17
-
-
Save jennings/811d471a713a4a96974c462398d29a5c to your computer and use it in GitHub Desktop.
Terminating TLS/SSL with Fiddler
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
static function redirectHttpsToHttp(oSession: Session, fromHost, toHost) { | |
if (oSession.HostnameIs(fromHost)) | |
{ | |
// Handle CONNECT Tunnels | |
if (oSession.HTTPMethodIs("CONNECT")) | |
{ | |
oSession["x-replywithtunnel"] = "FakeTunnel"; | |
return true; | |
} | |
oSession.fullUrl = "http://" + toHost + oSession.PathAndQuery; | |
} | |
return false; | |
} | |
static function OnBeforeRequest(oSession: Session) { | |
var shouldReturn = false; | |
shouldReturn = shouldReturn || redirectHttpsToHttp(oSession, "from-host.example.com", "to-host.autoalert.com"); | |
if (shouldReturn) { | |
return; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment