Package org.zaproxy.zap.extension.websocket.fuzz

Examples of org.zaproxy.zap.extension.websocket.fuzz.WebSocketFuzzMessageDTO


    return message;
  }

  @Override
  public WebSocketFuzzMessageDTO fuzz(String fuzzString) throws IllegalArgumentException {
    WebSocketFuzzMessageDTO fuzzedMessage = copyMessage(message);
     
    if (!(fuzzedMessage.payload instanceof String)) {
      // TODO: Exclude popup menu or support fuzzing binary payloads - why not?
      throw new IllegalArgumentException("You cannot fuzz binary messages!");
    }
View Full Code Here


   *
   * @param msg
   * @return
   */
  private WebSocketFuzzMessageDTO copyMessage(WebSocketMessageDTO msg) {
    WebSocketFuzzMessageDTO fuzzMessage = new WebSocketFuzzMessageDTO();
   
    msg.copyInto(fuzzMessage);
       
        return fuzzMessage;
  }
View Full Code Here

        WebSocketMessageDTO message;
       
        int channelId = rs.getInt("channel_id");
        WebSocketChannelDTO channel = getChannel(channelId);
        if (rs.getInt("fuzz_id") != 0) {
          WebSocketFuzzMessageDTO fuzzMessage = new WebSocketFuzzMessageDTO(channel);
          fuzzMessage.fuzzId = rs.getInt("fuzz_id");
          fuzzMessage.state = WebSocketFuzzMessageDTO.State.valueOf(rs.getString("state"));
          fuzzMessage.fuzz = rs.getString("fuzz");
         
          message = fuzzMessage;
View Full Code Here

      whereExpr.append(")");
      where.add(whereExpr.toString());
    }

    if (criteria instanceof WebSocketFuzzMessageDTO) {
      WebSocketFuzzMessageDTO fuzzCriteria = (WebSocketFuzzMessageDTO) criteria;
      if (fuzzCriteria.fuzzId != null) {
        params.add(fuzzCriteria.fuzzId);
        where.add("f.fuzz_id = ?");
      }
    }
View Full Code Here

        psInsertMessage.setInt(7, message.payloadLength);
        psInsertMessage.setBoolean(8, message.isOutgoing);
        psInsertMessage.execute();
       
        if (message instanceof WebSocketFuzzMessageDTO) {
          WebSocketFuzzMessageDTO fuzzMessage = (WebSocketFuzzMessageDTO) message;
          psInsertFuzz.setInt(1, fuzzMessage.fuzzId);
          psInsertFuzz.setInt(2, fuzzMessage.id);
          psInsertFuzz.setInt(3, fuzzMessage.channel.id);
          psInsertFuzz.setString(4, fuzzMessage.state.toString());
          psInsertFuzz.setString(5, fuzzMessage.fuzz);
View Full Code Here

TOP

Related Classes of org.zaproxy.zap.extension.websocket.fuzz.WebSocketFuzzMessageDTO

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.