private void secondPass(IExtensionHelpers helpers) {
   publish("Second Pass...");
   publish(0);
   Set<Map<String, CorrelatedParam>> allStats = new HashSet<>();
   allStats.add(urlParameters);
   allStats.add(bodyParameters);
   allStats.add(cookieParameters);
   int x = 0;
   for (IHttpRequestResponse message : inScopeMessagesWithResponses) {
     publish(100 * x / inScopeMessagesWithResponses.size());
     x += 1;
     String responseString = helpers.bytesToString(message.getResponse());
     for (Map<String, CorrelatedParam> paramMap : allStats) {
       for (String paramName : paramMap.keySet()) {
         publish("Analyzing " + paramName + "...");
         for (CorrelatedParam param : paramMap.values()) {
           for (String value : param.getUniqueValues()) {
             if (responseString.contains(value)) {
               param.putSeenParam(value, message);
             }
           }
         }
       }
     }
   }
 }
  private void doFuzzReq(String urn) {
    SlurpUtils utils = SlurpUtils.getInstance();
    IHttpRequestResponse req = SlurpHelperCheckDirFuzz.doDirFuzzReq(this, urn);
    if (req == null) return;
    issuedRequests++;
    int code = utils.getCodeFromResponse(req.getResponse());

    if (code == 200) {
      addFound(utils.getUriFromRequest(req));
      this.markAsPositive();
    }
  }
예제 #3
0
  public HttpMessage(IHttpRequestResponse ihrr) {
    host = ihrr.getHost();
    port = ihrr.getPort();

    try {
      protocol = ihrr.getProtocol();
      request = ihrr.getRequest();
      response = ihrr.getResponse();
      statusCode = ihrr.getStatusCode();
      url = ihrr.getUrl();
      comment = ihrr.getComment();
      highlight = ihrr.getHighlight();
    } catch (Exception e) {
      e.printStackTrace();
      throw new RuntimeException(e);
    }
  }