Package org.zaproxy.zap.extension.websocket

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


   * @param wsMessage
   * @throws WebSocketException
   */
  @Override
  public void onWebSocketPayload(WebSocketMessage wsMessage) throws WebSocketException {
    WebSocketMessageDTO message = wsMessage.getDTO();
    if (!extension.isSafe(message)) {
      return;
    }
   
    boolean isApplicableMessage = (wsMessage.isFinished() && wsMessage.getPayloadLength() > 0);
View Full Code Here


      connectedProxies = new HashMap<>();
    }
   
    @Override
    public void handleSendMessage(Message aMessage) throws WebServiceException {
        final WebSocketMessageDTO websocketMessage = (WebSocketMessageDTO)aMessage;
     
        if (websocketMessage.channel == null || websocketMessage.channel.id == null) {
        logger.warn("Invalid WebSocket channel selected. Unable to send manual crafted message!");
        throw new WebServiceException(Constant.messages.getString("websocket.manual_send.fail.invalid_channel")
            + " " + Constant.messages.getString("websocket.manual_send.fail"));
View Full Code Here

  }

  @Override
  public boolean match(Message aMessage, boolean isRequest, boolean onlyIfInScope) {
      if (aMessage instanceof WebSocketMessageDTO) {
          WebSocketMessageDTO msg = (WebSocketMessageDTO)aMessage;
         
          if (opcode != null) {
            if (!msg.readableOpcode.equals(opcode)) {
              return false;
            }
View Full Code Here

                    return;
                }
               
                try {
                    WebSocketMessagesViewModel model = (WebSocketMessagesViewModel)tableWebSocket.getModel();
                    WebSocketMessageDTO message = model.getDTO(rows[0]);
                    extension.addUiBreakpoint(message);
                   
                } catch (Exception e) {
                    extension.getView().showWarningDialog(Constant.messages.getString("brk.add.error.history"));
                }
View Full Code Here

    }

    @Override
    public boolean onMessageFrame(int channelId, WebSocketMessage wsMessage) {
      boolean continueNotifying = false;
        WebSocketMessageDTO message = wsMessage.getDTO();

    if (!extension.isSafe(message)) {
      // not safe => do not catch
      return true;
    }
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.