Examples of HistoryReference


Examples of org.parosproxy.paros.model.HistoryReference

  @Override
  public void onReturnNodeRendererComponent(SiteMapTreeCellRenderer component,
      boolean leaf, SiteNode node) {
    if (leaf) {
      HistoryReference href = component.getHistoryReferenceFromNode(node);
      boolean isWebSocketNode = href != null && href.isWebSocketUpgrade();
      if (isWebSocketNode) {
        boolean isConnected = isConnected(component.getHistoryReferenceFromNode(node));
        boolean isIncluded = node.isIncludedInScope() && !node.isExcludedFromScope();
       
        setWebSocketIcon(isConnected, isIncluded, component);
View Full Code Here

Examples of org.parosproxy.paros.model.HistoryReference

      handshakeButton.addActionListener(new ActionListener() {

        @Override
        public void actionPerformed(ActionEvent evt) {
          WebSocketChannelDTO channel = (WebSocketChannelDTO) channelSelect.getSelectedItem();
          HistoryReference handshakeRef = channel.getHandshakeReference();
          if (handshakeRef != null) {
            HttpMessage msg;
            try {
                            msg = handshakeRef.getHttpMessage();
                        } catch (Exception e) {
                          logger.warn(e.getMessage(), e);
                            return;
                        }
            showHandshakeMessage(msg);
View Full Code Here

Examples of org.parosproxy.paros.model.HistoryReference

    if (historyId == null) {
      return null;
    }
   
    try {
      return new HistoryReference(historyId);
    } catch (HttpMalformedHeaderException e) {
      return null;
    } catch (SQLException e) {
      return null;
    }
View Full Code Here

Examples of org.parosproxy.paros.model.HistoryReference

    dto.host = host;
    dto.port = port;
    dto.startTimestamp = (start != null) ? start.getTime() : null;
    dto.endTimestamp = (end != null) ? end.getTime() : null;
   
    HistoryReference handshakeRef = getHandshakeReference();
    if (handshakeRef != null) {
      try {
        dto.url = handshakeRef.getHttpMessage().getRequestHeader().getURI().toString();
      } catch (HttpMalformedHeaderException e) {
        dto.url = "";
        logger.error("HttpMessage for WebSockets-handshake not found!");
      } catch (SQLException e) {
        dto.url = "";
        logger.error("HttpMessage for WebSockets-handshake not found!");
      }
      dto.historyId = handshakeRef.getHistoryId();
    } else {
      dto.url = "";
      dto.historyId = null;
    }
   
View Full Code Here

Examples of org.parosproxy.paros.model.HistoryReference

    }
   
    logger.debug("Scanner " + scanner.getName() +
        " matched URL " + msg.getRequestHeader().getURI().toString() +
        " action = " + scanner.getType().toString());
    HistoryReference hRef = msg.getHistoryRef();
   
    switch (scanner.getType()) {
    case TAG:
      String tag = scanner.getConfig();
      msg.addTag(tag);
      if (hRef != null) {
        // If the hRef has been created before msg gets updated then
        // the tag wont have been stored in the db, so double check
        // and add in if missing
        if (! hRef.getTags().contains(tag)) {
          hRef.addTag(tag);
          extHist.getHistoryList().notifyItemChanged(hRef);
        }
      }
      break;
    case ALERT:
          Alert alert = scanner.getAlert(msg);
      if (hRef != null) {
        // If the hRef has been created before msg gets updated then
        // the alerts wont have been stored in the db, so double check
        // and add in if missing
        // TODO of course this wont help if the href doesnt exist...
        alert.setSourceHistoryId(hRef.getHistoryId());
        hRef.addAlert(alert);
        extHist.getHistoryList().notifyItemChanged(hRef);
      }
        // Raise the alert
      extScan.alertFound(alert);
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();
                 extension.showAlertAddDialog(ref);
          }
        });
  }
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();
                  extension.showManageTagsDialog(ref, msg.getTags());
                } catch (HttpMalformedHeaderException e1) {
                    e1.printStackTrace();
                } catch (SQLException e1) {
                    e1.printStackTrace();
View Full Code Here

Examples of org.parosproxy.paros.model.HistoryReference

                if (obj.length != 1) {
                    return;
                }
               
                try {
                    HistoryReference ref = (HistoryReference) obj[0];
                    URI uri = ref.getHttpMessage().getRequestHeader().getURI();
                   
                    extension.showBreakAddDialog(uri.getURI());
                   
                } catch (Exception e1) {
                    extension.getView().showWarningDialog(Constant.messages.getString("brk.add.error.history"));
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();
                  extension.showNotesAddDialog(ref, msg.getNote());
                 
                } catch (HttpMalformedHeaderException e1) {
                    e1.printStackTrace();
                } catch (SQLException e1) {
View Full Code Here

Examples of org.parosproxy.paros.model.HistoryReference

  }

  public void readURI(HttpMessage msg) {
    SiteMap siteTree = getModel().getSession().getSiteTree();

    HistoryReference historyRef = null;
    try {
      historyRef = new HistoryReference(getModel().getSession(),
          HistoryReference.TYPE_SPIDER, msg);
    } catch (Exception e) {
      // ZAP: Log exceptions
          log.warn(e.getMessage(), e);
    }
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.