Class AbstractAppParamPlugin

    • Constructor Detail

      • AbstractAppParamPlugin

        public AbstractAppParamPlugin()
    • Method Detail

      • scan

        protected void scan​(java.util.List<NameValuePair> nameValuePairs)
        Scans the current message using the list of NameValuePairs handled by the current variant. This method should be overridden for the use-cases of manipulating multiple parameters in a HttpMessage.

        By default this method calls scan(HttpMessage, NameValuePair) for each NameValuePair.

        Parameters:
        nameValuePairs - list of parameters handled by the current variant
        Since:
        2.11.0
        See Also:
        setParameters(HttpMessage, List)
      • scan

        public void scan​(HttpMessage msg,
                         java.lang.String param,
                         java.lang.String value)
        Plugin method that need to be implemented for the specific test. The passed message is a copy which maintains only the Request's information so if the plugin need to manage the original Response body a getBaseMsg() call should be done. the param name and the value are the original value retrieved by the crawler and the current applied Variant.
        Parameters:
        msg - a copy of the HTTP message currently under scanning
        param - the name of the parameter under testing
        value - the clean value (no escaping is needed)
      • scan

        public void scan​(HttpMessage msg,
                         NameValuePair originalParam)
        General method for a specific Parameter scanning, which allows developers to access all the settings specific of the parameters like the place/type where the name/value pair has been retrieved. This method can be overridden so that plugins that need a more deep access to the parameter context can benefit about this possibility.
        Parameters:
        msg - a copy of the HTTP message currently under scanning
        originalParam - the parameter pair with all the context informations
      • setParameter

        protected java.lang.String setParameter​(HttpMessage message,
                                                java.lang.String param,
                                                java.lang.String value)
        Sets the parameter into the given message. If both parameter name and value are null, the parameter will be removed.
        Parameters:
        message - the message that will be changed
        param - the name of the parameter
        value - the value of the parameter
        Returns:
        the parameter set
        See Also:
        setEscapedParameter(HttpMessage, String, String)
      • setEscapedParameter

        protected java.lang.String setEscapedParameter​(HttpMessage message,
                                                       java.lang.String param,
                                                       java.lang.String value)
        Sets the parameter into the given message. If both parameter name and value are null, the parameter will be removed.

        The value is expected to be properly encoded/escaped.

        Parameters:
        message - the message that will be changed
        param - the name of the parameter
        value - the value of the parameter
        Returns:
        the parameter set
        See Also:
        setParameter(HttpMessage, String, String)
      • setParameters

        protected void setParameters​(HttpMessage message,
                                     java.util.List<InputVector> inputVectors)
        Sets the parameters into the given message. Please refer getBuilder() for building InputVectors.
        Parameters:
        message - the message that will be changed
        inputVectors - list of the parameters
        Since:
        2.11.0