Skip to content

Instantly share code, notes, and snippets.

@JamoCA
Last active June 15, 2018 20:53
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save JamoCA/22db8d68a9a2fb20cb04a85360185333 to your computer and use it in GitHub Desktop.
Save JamoCA/22db8d68a9a2fb20cb04a85360185333 to your computer and use it in GitHub Desktop.
Fiddler Rule to override website 403 HTTP Status and change it to "200 OK" so that it can be accessed using CRON/WGET/HTTrack
/* 20180615 Fiddler rule to ignore all 403 HTTP Status errors so WGET or HTTrack can generate local copy of remote website */
SCENARIO: Changing the user agent or setting a delay isn't enough and the entire remote server is configured to respond w/403.
CONFIGURE: Add below rule to FiddlerScript OnBeforeReponse() section. Configure HTTrack/WGET/CRON to use proxy 127.0.0.01:8888 */
static function OnBeforeResponse(oSession: Session) {
if (oSession.HostnameIs("TARGETHOSTNAME_FILTER.com") && oSession.responseCode == 403) {
oSession.responseCode = 200;
oSession.oResponse.headers.HTTPResponseCode = 200;
oSession.oResponse.headers.HTTPResponseStatus = "200 OK";
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment