Package org.zaproxy.zap.extension.websocket

Examples of org.zaproxy.zap.extension.websocket.WebSocketMessageDTO


     
      return "\\Q" + channel.getFullUri() + "\\E";
  }

  private WebSocketChannelDTO getSelectedChannelDTO() {
    WebSocketMessageDTO message = getSelectedMessageDTO();
    if (message == null) {
      return null;
    }
   
    WebSocketChannelDTO channel = new WebSocketChannelDTO();
View Full Code Here


  public WebSocketPopupHelper(JTable invoker) {
    messagesView = invoker;
  }

  public WebSocketMessageDTO getSelectedMessage() {
    WebSocketMessageDTO message = null;
        int[] rows = messagesView.getSelectedRows();
        if (rows.length == 1) {
          int index = rows[0];
        WebSocketMessagesViewModel model = (WebSocketMessagesViewModel) messagesView.getModel();
            message = model.getDTO(index);
View Full Code Here

            WebSocketMessagesViewModel model = (WebSocketMessagesViewModel) view.getModel();
           
            // as we use a JXTable here, that can be sorted, we have to
            // transform the row index to the appropriate model row
                    int modelRow = view.convertRowIndexToModel(rowIndex);
          final WebSocketMessageDTO message = model.getDTO(modelRow);
                    readAndDisplay(message);
        }
      }
    };
  }
View Full Code Here

    }
  }
   
    @Override
    public void run() {
        WebSocketMessageDTO message = null;
        int count = 0;
       
        do {
            synchronized(displayQueue) {
                count = displayQueue.size();
                if (count == 0) {
                    break;
                }
               
                message = displayQueue.get(0);
                displayQueue.remove(0);
            }
           
            try {
                final WebSocketMessageDTO msg = message;
                EventQueue.invokeAndWait(new Runnable() {
                    @Override
                    public void run() {
                        if (msg.isOutgoing.booleanValue()) {
                            requestPanel.setMessage(msg);
View Full Code Here

            // because the Message used is not updated with the changes.
          if (isEditable()) {
              return false;
          }
         
          WebSocketMessageDTO message = (WebSocketMessageDTO) getMessage();
         
          // do not allow to fuzz if there is no active connection
          if (!extWebSocket.isConnected(message.channel.id)) {
            return false;
          }
View Full Code Here

public class WebSocketLargePayloadUtil extends LargeResponseUtil {

  public static boolean isLargePayload(Message aMessage) {
    if (aMessage instanceof WebSocketMessageDTO) {
      WebSocketMessageDTO message = (WebSocketMessageDTO) aMessage;
      if (message.payloadLength == null) {
        return false;
      }
      return message.payloadLength > minContentLength;
    }
View Full Code Here

   
    return null;
  }

  protected WebSocketMessageDTO getCriterionMessage() {
    WebSocketMessageDTO message = new WebSocketMessageDTO();
   
    if (activeChannelId != null) {
      message.channel.id = activeChannelId;
    }
   
View Full Code Here

   *
   * @param rowIndex
   * @return data transfer object
   */
  public WebSocketMessageDTO getDTO(int rowIndex) {
    WebSocketMessageDTO message = getRowObject(rowIndex);
   
    if (message == null) {
      return null;
    }
   
    String pk = message.toString();
    if (fullMessagesCache.containsKey(pk)) {
      return (WebSocketMessageDTO) fullMessagesCache.get(pk);
    } else if (message.id == null) {
      return message;
    } else {
      try {
        WebSocketMessageDTO fullMessage = table.getMessage(message.id, message.channel.id);
        fullMessagesCache.put(pk, fullMessage);
       
        return fullMessage;
      } catch (SQLException e) {
        logger.error("Error retrieving full message!",e);
View Full Code Here

  public Integer getModelRowIndexOf(WebSocketMessageDTO message) {
    if (message.id == null) {
      return null;
    }
   
    WebSocketMessageDTO criteria = getCriterionMessage();
    criteria.channel.id = message.channel.id;
    criteria.id = message.id;
   
    try {
      return table.getIndexOf(criteria, null, null);
View Full Code Here

        }
      });
    }
   
  protected void performAction() throws SQLException {
    WebSocketMessageDTO message = wsPopupHelper.getSelectedMessage();
    if (message != null) {
      String url = Pattern.quote(message.channel.getContextUrl());
         
          Session session = Model.getSingleton().getSession();
            context.addExcludeFromContextRegex(url);
View Full Code Here

TOP

Related Classes of org.zaproxy.zap.extension.websocket.WebSocketMessageDTO

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.