Package org.zaproxy.zap.extension.websocket

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


            msg.id = null;
            fuzzResult.setAbort(true);
            throw new WebSocketChannelClosedException("Channel #" + msg.channel.id + " does not exist!");
          }
         
          WebSocketProxy wsProxy = wsProxies.get(msg.channel.id);
         
          // send message and notify all observers
          // retrieve message from result to get state & fuzz set
        wsProxy.sendAndNotify(fuzzResult.getMessage());
        } catch (Exception e) {
            logger.error(e.getMessage(), e);
            fuzzResult.setState(FuzzResult.State.ERROR);
        }
       
View Full Code Here


        throw new WebServiceException(Constant.messages.getString("websocket.manual_send.fail.invalid_opcode")
            + " " + Constant.messages.getString("websocket.manual_send.fail"));
      }
     
        try {
          WebSocketProxy wsProxy = getDelegate(websocketMessage.channel.id);
          if (!websocketMessage.isOutgoing && wsProxy.isClientMode()) {
            logger.warn("Invalid WebSocket direction 'incoming' selected for Proxy in Client Mode. Unable to send manual crafted message!");
            throw new WebServiceException(Constant.messages.getString("websocket.manual_send.fail.invalid_direction_client_mode")
                + " " + Constant.messages.getString("websocket.manual_send.fail"));
          }
          wsProxy.sendAndNotify(websocketMessage);
        } catch (final IOException ioe) {
          logger.warn(ioe.getMessage(), ioe);
            throw new WebServiceException("IO error in sending WebSocket message.");
        }
    }
View Full Code Here

TOP

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

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.