Examples of HistoryReference


Examples of org.parosproxy.paros.model.HistoryReference

                if (obj.length > 1) {
                    extension.getView().showWarningDialog("Only one response can be exported at a time.");                  
                    return;
                }

                HistoryReference ref = (HistoryReference) obj[0];
                HttpMessage msg = null;
                try {
                    msg = ref.getHttpMessage();
                } catch (Exception e1) {
                    extension.getView().showWarningDialog("Error reading response.");
                    return;
                }
               
View Full Code Here

Examples of org.parosproxy.paros.model.HistoryReference

        this.add(txtTag, gridBagConstraints4);
    }

    public Component getListCellRendererComponent(JList list, Object value, int index, boolean isSelected, boolean cellHasFocus) {
       
        HistoryReference ref = (HistoryReference) value;
        txtId.setText(Integer.toString(ref.getHistoryId()));
       
        HttpMessage msg;
        try {
            msg = ref.getHttpMessage();
            txtMethod.setText(msg.getRequestHeader().getMethod());
            txtURI.setText(msg.getRequestHeader().getURI().toString());
            txtStatus.setText(Integer.toString(msg.getResponseHeader().getStatusCode()));
            txtReason.setText(msg.getResponseHeader().getReasonPhrase());
            txtRTT.setText(msg.getTimeElapsedMillis()+"ms");
View Full Code Here

Examples of org.parosproxy.paros.model.HistoryReference

                  }
              }
              synchronized(extension.getHistoryList()) {
                 
                  for (int i=0; i<obj.length; i++) {
                      HistoryReference ref = (HistoryReference) obj[i];
                      purgeHistory(ref);
                  }
              }
          }
        });
View Full Code Here

Examples of org.parosproxy.paros.model.HistoryReference

          public void actionPerformed(java.awt.event.ActionEvent e) {   
              JList listLog = extension.getLogPanel().getListLog();
              Object[] obj = listLog.getSelectedValues();
              for (int i=0; i<obj.length; i++) {
                  HistoryReference ref = (HistoryReference) obj[i];
                  deleteHistory(ref);
              }
          }
        });
View Full Code Here

Examples of org.parosproxy.paros.model.HistoryReference

  }
   
    private void addHistory(HttpMessage msg, int type) {

       
        HistoryReference historyRef = null;

        try {
            historyRef = new HistoryReference(model.getSession(), type, msg);
        } catch (Exception e) {
            return;
        }

        if (type != HistoryReference.TYPE_MANUAL && type != HistoryReference.TYPE_HIDDEN) {
            return;
        }

        // add history to list (log panel).  Must use event queue because this proxylistener may not be run from event queue.
        synchronized(historyList) {
            if (type == HistoryReference.TYPE_MANUAL) {
               
                if (pattern == null) {
                    addHistoryInEventQueue(historyRef);
                } else {
                    StringBuffer sb = new StringBuffer();
                    sb.append(msg.getRequestHeader().toString());
                    sb.append(msg.getRequestBody().toString());
                    if (!msg.getResponseHeader().isEmpty()) {
                        sb.append(msg.getResponseHeader().toString());
                        sb.append(msg.getResponseBody().toString());
                       
                    }
                    if (pattern.matcher(sb.toString()).find()) {
                        addHistoryInEventQueue(historyRef);
                    }
                }
            }
        }

        // add history to site panel.  Must use event queue because this proxylistener may not be run from event queue.
        final HistoryReference ref = historyRef;
        final HttpMessage finalMsg = msg;
        if (EventQueue.isDispatchThread()) {
            model.getSession().getSiteTree().addPath(ref, msg);
            if (isFirstAccess) {
                isFirstAccess = false;
View Full Code Here

Examples of org.parosproxy.paros.model.HistoryReference

        public void valueChanged(javax.swing.event.ListSelectionEvent e) {
            if (listLog.getSelectedValue() == null) {
                return;
            }
                   
          final HistoryReference historyRef = (HistoryReference) listLog.getSelectedValue();

                    readAndDisplay(historyRef);

        }
View Full Code Here

Examples of org.parosproxy.paros.model.HistoryReference

            responsePanel.setMessage(msg, false);
        }
    }

    public void run() {
        HistoryReference ref = null;
        int count = 0;
       
        do {
            synchronized(displayQueue) {
                count = displayQueue.size();
                if (count == 0) {
                    break;
                }
               
                ref = (HistoryReference) displayQueue.get(0);
                displayQueue.remove(0);
            }
           
            try {
                final HistoryReference finalRef = ref;
                final HttpMessage msg = ref.getHttpMessage();
                EventQueue.invokeAndWait(new Runnable() {
                    public void run() {
                        displayMessage(msg);
                        checkAndShowBrowser(finalRef, msg);
View Full Code Here

Examples of org.parosproxy.paros.model.HistoryReference

        this.addActionListener(new java.awt.event.ActionListener() {

          public void actionPerformed(java.awt.event.ActionEvent e) {
             
              JList listLog = extension.getLogPanel().getListLog();
              HistoryReference ref = (HistoryReference) listLog.getSelectedValue();
              HttpMessage msg = null;
              try {
                    msg = ref.getHttpMessage();
                    JTextField[] inputs = new JTextField[1];
                    inputs[0] = new JTextField(msg.getTag());
                    String tag = JOptionPane.showInputDialog(extension.getView().getMainFrame(), "Tag this message as:", msg.getTag());
                    if (tag != null) {
                        ref.setTag(tag);
                        extension.getHistoryList().notifyItemChanged(ref);
                    }
                } catch (HttpMalformedHeaderException e1) {
                    e1.printStackTrace();
                } catch (SQLException e1) {
View Full Code Here

Examples of org.parosproxy.paros.model.HistoryReference

     
  }
 
  private void buildHistory(HistoryList historyList, List dbList) {

      HistoryReference historyRef = null;
      synchronized (historyList) {
          historyList.clear();
         
          for (int i=0; i<dbList.size(); i++) {
              int historyId = ((Integer) dbList.get(i)).intValue();

              try {
                      historyRef = new HistoryReference(historyId);
                      historyList.addElement(historyRef);
              } catch (Exception e) {};
          }
      }
View Full Code Here

Examples of org.parosproxy.paros.model.HistoryReference

          public void actionPerformed(java.awt.event.ActionEvent e) {
             
              ManualRequestEditorDialog dialog = extension.getResendDialog();
             
              JList listLog = extension.getLogPanel().getListLog();
              HistoryReference ref = (HistoryReference) listLog.getSelectedValue();
              HttpMessage msg = null;
              try {
                    msg = ref.getHttpMessage().cloneRequest();
                    dialog.setMessage(msg);
                    dialog.setVisible(true);
                } catch (HttpMalformedHeaderException e1) {
                    e1.printStackTrace();
                } catch (SQLException e1) {
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.