Package org.parosproxy.paros.network

Examples of org.parosproxy.paros.network.HttpMessage


    public void scan() {
        listVariant.add(new VariantURLQuery());
        listVariant.add(new VariantFormQuery());
       
        for (int i=0; i<listVariant.size() && !isStop(); i++) {
            HttpMessage msg = getNewMsg();
            variant = (Variant) listVariant.get(i);
            variant.setMessage(msg);
            scanVariant();
        }
       
View Full Code Here


    }

    private void scanVariant() {
        for (int i=0; i<variant.getParamList().size() && !isStop(); i++) {
            originalPair = (NameValuePair) variant.getParamList().get(i);
            HttpMessage msg = getNewMsg();
            scan(msg, originalPair.getName(), originalPair.getValue());
        }
    }
View Full Code Here

  }

    public void scan() {
        for (int i=0; i<getListURI().size() && !isStop(); i++) {
            URI uri = (URI) getListURI().get(i);
            HttpMessage msg = getNewMsg();
            try {
                msg.getRequestHeader().setURI(uri);
                msg.getRequestBody().setLength(0);
                sendAndReceive(msg);
                if (isFileExist(msg)) {
                    bingo(Alert.RISK_MEDIUM, Alert.SUSPICIOUS, uri.toString(), "", "", msg);
                }
            } catch (Exception e) {
View Full Code Here

    int getDepth() {
        return depth;
    }
   
    HttpMessage getMessage() {
        HttpMessage msg = null;
        try {
            msg = ref.getHttpMessage();
        } catch (Exception e) {}
       
        return msg;
View Full Code Here

  }

  public void scan() {
     
      boolean result = false;
      HttpMessage msg = getNewMsg();
      int reliability = Alert.WARNING;
     
      try {
            checkIfDirectory(msg);
            writeProgress(msg.getRequestHeader().getURI().toString());
        sendAndReceive(msg);

        if (msg.getResponseHeader().getStatusCode() != HttpStatusCode.OK) {
          return;
        }
       
        if (matchBodyPattern(msg, patternIIS, null)) {
          result = true;
        } else if (matchBodyPattern(msg, patternApache, null)) {
          result = true;
        } else if (matchBodyPattern(msg, patternGeneralParent, null)) {
          result = true;
          reliability = Alert.SUSPICIOUS;
        } else if (matchBodyPattern(msg, patternGeneralDir1, null)) {
          if (matchBodyPattern(msg, patternGeneralDir2, null)) {
            result = true;
            reliability = Alert.SUSPICIOUS;
          }
        }


        } catch (IOException e) {
        }
   
    if (result) {
            bingo(Alert.RISK_MEDIUM, reliability, msg.getRequestHeader().getURI().toString(), "", "", msg);
    }
  }
View Full Code Here

     */
    private HttpMessage buildMsg(URI base, String link) throws URIException, HttpMalformedHeaderException {

        URI uri = null;       
        uri = new URI(base, link, true);
        HttpMessage msg = new HttpMessage(new HttpRequestHeader(HttpRequestHeader.GET, uri, HttpHeader.HTTP11));
        return msg;
    }
View Full Code Here

      Frame[] frames = html.getFrames();
//      Img[] imgs = html.getImgs();
      Hyperlink[] hlinks = html.getHyperlinks();
      Meta[] metas = html.getMetas();
     
      HttpMessage msg = null;
     
      // process ANCHOR
      for (int i=0; i<as.length; i++) {
          String href = as[i].getHref().replaceAll("&amp;","&");
          try {
View Full Code Here

                }
        qryStrList = addSelectField(qryStrList, select);
      }

      for (int i=0; i<qryStrList.size(); i++) {
          HttpMessage msg = null;
        URI uri = null;
        String qryStr = (String) qryStrList.elementAt(i);
        if (form.getMethod().equalsIgnoreCase(Form.GET)) {
            String action = (form.getAction().indexOf(QUESTION) <0) ? form.getAction()+QUESTION+qryStr : form.getAction()+AMPERSAND+qryStr;           
          uri = new URI(baseURI, action, true);
          reqHeader = new HttpRequestHeader(form.getMethod().trim().toUpperCase(), uri, HttpHeader.HTTP11);
          msg = new HttpMessage(reqHeader);
        } else if (form.getMethod().equalsIgnoreCase(Form.POST)) {
                   
                    if (!parent.getParent().getSpiderParam().isPostForm()) {
                        continue;
                    }
            uri = new URI(baseURI, form.getAction(), true);
            reqHeader = new HttpRequestHeader(form.getMethod().trim().toUpperCase(), uri, HttpHeader.HTTP11);
            reqBody = new HttpBody(qryStr);
            reqHeader.setContentLength(reqBody.length());
            msg = new HttpMessage(reqHeader, reqBody);
        } else {
            continue;
        }
        msg.getRequestHeader().setContentLength(msg.getRequestBody().length());
        qryList.add(msg);
      }
    } catch (Exception e) {
    }
View Full Code Here

              List list = getModel().getDb().getTableHistory().getHistoryList(session.getSessionId(), HistoryReference.TYPE_MANUAL, filter,isRequest);
              int last = list.size();
              for (int index=0;index < last;index++){
                  int v = ((Integer)(list.get(index))).intValue();
                  try {
                        HttpMessage message = getModel().getDb().getTableHistory().read(v).getHttpMessage();

                        if (isRequest){
                            matcher = pattern.matcher(message.getRequestHeader().toString()+ message.getRequestBody().toString());   
                        }
                        else{
                            matcher = pattern.matcher(message.getResponseHeader().toString()+ message.getResponseBody().toString());   
                        }
                    while (matcher.find()) {
                        if (result.indexOf(matcher.group(0))==-1)
                                result += "\r\n" + matcher.group(0);
                    }               
View Full Code Here

     
  }
 
    private void showBrowser(HistoryReference ref) {
        HttpMessage msg = null;
        try {
            msg = ref.getHttpMessage();
            if (!extension.browserDisplay(ref, msg)) {
                extension.getView().showWarningDialog("Selecetd HTTP message type cannot be shown.");
            }
View Full Code Here

TOP

Related Classes of org.parosproxy.paros.network.HttpMessage

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.