Source:
public void scan() { if (!getBaseMsg().getRequestHeader().isSecure()) { if (log.isDebugEnabled()) { log.debug( "The original request was not HTTPS, so there is not much point in looking further."); } return; } int originalStatusCode = getBaseMsg().getResponseHeader().getStatusCode(); boolean was404 = isPage404(getBaseMsg()); if (was404 || originalStatusCode == 0) { if (log.isDebugEnabled()) { log.debug( "The original request was not successfuly completed (status = " + originalStatusCode + "), so there is not much point in looking further."); log.debug("isPage404 returned: " + was404); } return; } if (log.isDebugEnabled()) { log.debug( "Checking if " + getBaseMsg().getRequestHeader().getURI() + " is available via HTTP."); } HttpMessage newRequest = getNewMsg(); try { newRequest.getRequestHeader().setSecure(false); if (log.isDebugEnabled()) { log.debug("**" + newRequest.getRequestHeader().getURI()); } } catch (URIException e) { log.error("Error creating HTTP URL from HTTPS URL:", e); return; } if (isStop()) { if (log.isDebugEnabled()) { log.debug("Scan rule " + getName() + " Stopping."); } return; } try { sendAndReceive(newRequest, false); } catch (IOException e) { log.error("Error scanning a request via HTTP when the original was HTTPS:", e); return; } if (newRequest.getResponseHeader().getStatusCode() == HttpStatusCode.OK) { String newUri = newRequest.getRequestHeader().getURI().toString(); newAlert() .setConfidence(Alert.CONFIDENCE_MEDIUM) .setUri(getBaseMsg().getRequestHeader().getURI().toString()) .setOtherInfo(Constant.messages.getString(MESSAGE_PREFIX + "otherinfo", newUri)) .setEvidence(newUri) .setMessage(newRequest) .raise(); } }

Target:
public void scan() { if (!getBaseMsg().getRequestHeader().isSecure()) { if (log.isDebugEnabled()) { log.debug( "The original request was not HTTPS, so there is not much point in looking further."); } return; } int originalStatusCode = getBaseMsg().getResponseHeader().getStatusCode(); boolean was404 = isPage404(getBaseMsg()); if (was404) { if (log.isDebugEnabled()) { log.debug( "The original request was not successfuly completed (status = " + originalStatusCode + "), so there is not much point in looking further."); log.debug("isPage404 returned: " + was404); } return; } if (log.isDebugEnabled()) { log.debug( "Checking if " + getBaseMsg().getRequestHeader().getURI() + " is available via HTTP."); } HttpMessage newRequest = getNewMsg(); try { newRequest.getRequestHeader().setSecure(false); if (log.isDebugEnabled()) { log.debug("**" + newRequest.getRequestHeader().getURI()); } } catch (URIException e) { log.error("Error creating HTTP URL from HTTPS URL:", e); return; } if (isStop()) { if (log.isDebugEnabled()) { log.debug("Scan rule " + getName() + " Stopping."); } return; } try { sendAndReceive(newRequest, false); } catch (IOException e) { log.error("Error scanning a request via HTTP when the original was HTTPS:", e); return; } if (newRequest.getResponseHeader().getStatusCode() == HttpStatusCode.OK) { String newUri = newRequest.getRequestHeader().getURI().toString(); newAlert() .setConfidence(Alert.CONFIDENCE_MEDIUM) .setUri(getBaseMsg().getRequestHeader().getURI().toString()) .setOtherInfo(Constant.messages.getString(MESSAGE_PREFIX + "otherinfo", newUri)) .setEvidence(newUri) .setMessage(newRequest) .raise(); } }