Package org.owasp.webscarab.model

Examples of org.owasp.webscarab.model.Response


      if (o == null || !(o instanceof ConversationID))
        return;
      ConversationID conversation = (ConversationID) o;
      FrameworkModel fm = identity.getFramework().getModel();
      Request request = fm.getRequest(conversation);
      Response response = fm.getResponse(conversation);
      List<NamedValue> reqTokens = identity.getRequestTokens(request);
      List<NamedValue> respTokens = identity.getResponseTokens(response);
      Object c = getValue("COMPONENT");
      Component component = null;
      if (c instanceof Component)
View Full Code Here


    }
    return identities.size() == 0 ? null : identities;
  }

  private Date getConversationDate(ConversationID id) {
    Response response = framework.getModel().getResponse(id);
    Date date = null;
    String serverTime = response.getHeader("Date");
    if (serverTime != null) {
      try {
        date = RFC2822.parseDate(serverTime);
      } catch (ParseException e) {
      }
View Full Code Here

        addTransition(cid, "PHPSESSID", sessid, null);
      } else if (req.getMethod().equals("POST") && url.toString().endsWith("login.php")) {
        String sessid = null;
        if (tokens.size() > 0)
          sessid = tokens.get(0).getValue();
        Response response = cm.getResponse(cid);
        if (response.getStatus().equals("302")) {
          String who = null;
          tokens = getResponseTokens(response);
          if (tokens.size() > 0)
            sessid = tokens.get(0).getValue();
          String content = new String(req.getContent());
View Full Code Here

        public void run() {
          HTTPClient client = HTTPClientFactory.getInstance().getHTTPClient();
            while (_running) {
                Request request = getNextRequest();
                try {
                    Response response = client.fetchResponse(request);
                    response.flushContentStream();
                    responseReceived(response);
                } catch (IOException ioe) {
                    requestError(request, ioe);
                }
            }
View Full Code Here

                _logger.info("Creating a new Fetcher");
                hc = getHTTPClient();
                _clientList.add(hc);
            }
        }
        Response response = null;
        IOException ioe = null;
        try {
            response = hc.fetchResponse(request);
        } catch (IOException e) {
            ioe = e;
View Full Code Here

                request.write(_out);
            }
            _out.flush();
            _logger.finest("Request : \n" + request.toString());

            _response = new Response();
            _response.setRequest(request);

            // test for spurious 100 header from IIS 4 and 5.
            // See http://mail.python.org/pipermail/python-list/2000-December/023204.html
            _logger.fine("Reading the response");
View Full Code Here

                        _out.write(("Proxy-Authorization: " + authHeader + "\r\n").getBytes());
                    }
                    _out.write("\r\n".getBytes());
                    _out.flush();
                    _logger.fine("Sent CONNECT, reading Proxy response");
                    Response response = new Response();
                    response.read(_in);
                    _logger.fine("Got proxy response " + response.getStatusLine());
                    status = response.getStatus();
                    if (status.equals("407")) {
                        response.flushContentStream();
                        oldAuthHeader = authHeader;
                        String[] challenges = response.getHeaders("Proxy-Authenticate");
                        if (_proxyAuthCreds == null && _authenticator != null)
                            _proxyAuthCreds = _authenticator.getProxyCredentials(_httpsProxy, challenges);
                        if (_proxyAuthCreds == null) {
                            _response = response;
                            return;
View Full Code Here

                //Runs on the event-dispatching thread.
                public void finished() {
                    Object obj = getValue();
                    if (obj instanceof Response) {
                        Response response = (Response) getValue();
                        if (response != null) {
                            _responsePanel.setResponse(response);
                            String name = nameTextField.getText();
                            String regex = regexTextField.getText();
                            try {
View Full Code Here

        ConversationModel conversationModel = this.model.getConversationModel();
        HttpUrl samlHttpUrl = conversationModel.getRequestUrl(samlId);
        int samlConversationIndex = conversationModel.getIndexOfConversation(samlId);
        for (int conversationIndex = samlConversationIndex - 1; conversationIndex >= 0; conversationIndex--) {
            ConversationID id = conversationModel.getConversationAt(conversationIndex);
            Response response = conversationModel.getResponse(id);
            HttpUrl httpUrl = conversationModel.getRequestUrl(id);
            Object parsedContent = Parser.parse(httpUrl, response);
            if (null == parsedContent) {
                continue;
            }
View Full Code Here

        return null;
    }

    public byte[] getResponseContent(ConversationID id) {
        ConversationModel conversationModel = this.model.getConversationModel();
        Response response = conversationModel.getResponse(id);
        byte[] content = response.getContent();
        return content;
    }
View Full Code Here

TOP

Related Classes of org.owasp.webscarab.model.Response

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.