Search in sources :

Example 1 with HttpBreakpointMessage

use of org.zaproxy.zap.extension.brk.impl.http.HttpBreakpointMessage in project zaproxy by zaproxy.

the class ExtensionBreak method addHttpBreakpoint.

public void addHttpBreakpoint(String string, String location, String match, boolean inverse, boolean ignoreCase) {
    Location loc;
    Match mtch;
    try {
        loc = Location.valueOf(location);
    } catch (Exception e) {
        throw new InvalidParameterException("location must be one of " + Arrays.toString(Location.values()));
    }
    try {
        mtch = Match.valueOf(match);
    } catch (Exception e) {
        throw new InvalidParameterException("match must be one of " + Arrays.toString(Match.values()));
    }
    this.addBreakpoint(new HttpBreakpointMessage(string, loc, mtch, inverse, ignoreCase));
}
Also used : InvalidParameterException(java.security.InvalidParameterException) HttpBreakpointMessage(org.zaproxy.zap.extension.brk.impl.http.HttpBreakpointMessage) InvalidParameterException(java.security.InvalidParameterException) MalformedURLException(java.net.MalformedURLException) Location(org.zaproxy.zap.extension.brk.impl.http.HttpBreakpointMessage.Location) Match(org.zaproxy.zap.extension.brk.impl.http.HttpBreakpointMessage.Match)

Example 2 with HttpBreakpointMessage

use of org.zaproxy.zap.extension.brk.impl.http.HttpBreakpointMessage in project zaproxy by zaproxy.

the class ExtensionBreak method removeHttpBreakpoint.

public void removeHttpBreakpoint(String string, String location, String match, boolean inverse, boolean ignoreCase) {
    Location loc;
    Match mtch;
    try {
        loc = Location.valueOf(location);
    } catch (Exception e) {
        throw new InvalidParameterException("location must be one of " + Arrays.toString(Location.values()));
    }
    try {
        mtch = Match.valueOf(match);
    } catch (Exception e) {
        throw new InvalidParameterException("match must be one of " + Arrays.toString(Match.values()));
    }
    this.removeBreakpoint(new HttpBreakpointMessage(string, loc, mtch, inverse, ignoreCase));
}
Also used : InvalidParameterException(java.security.InvalidParameterException) HttpBreakpointMessage(org.zaproxy.zap.extension.brk.impl.http.HttpBreakpointMessage) InvalidParameterException(java.security.InvalidParameterException) MalformedURLException(java.net.MalformedURLException) Location(org.zaproxy.zap.extension.brk.impl.http.HttpBreakpointMessage.Location) Match(org.zaproxy.zap.extension.brk.impl.http.HttpBreakpointMessage.Match)

Aggregations

MalformedURLException (java.net.MalformedURLException)2 InvalidParameterException (java.security.InvalidParameterException)2 HttpBreakpointMessage (org.zaproxy.zap.extension.brk.impl.http.HttpBreakpointMessage)2 Location (org.zaproxy.zap.extension.brk.impl.http.HttpBreakpointMessage.Location)2 Match (org.zaproxy.zap.extension.brk.impl.http.HttpBreakpointMessage.Match)2