extensions that have registered an iintruderpayloadgeneratorfactory must return new instance of this interface when required as part of new intruder attack *public interface iintruderpayloadgenerator /*this method is used by burp to determine whether the payload generator is able to provide any further payloads @return extensions should return false when all the available payloads have been used upotherwise true *boolean hasmorepayloads()/*this method is used by burp to obtain the value of the next payload @param basevalue the base value of the current payload position this value may be null if the concept of base value is not applicable ( in battering ram attack@return the next payload to use in the attack *byte[getnextpayload(byte[basevalue)/*this method is used by burp to reset the state of the payload generator so that the next call to getnextpayload(returns the first payload again this method will be invoked when an attack uses the same payload generator for more than one payload positionfor example in sniper attack *void reset()okayso we need to implement the base class and it needs to expose three functions the first functionhasmorepayloads is simply there to decide whether to continue mutated requests back to burp intruder we'll just use counter to deal with thisand once the counter is at the maximum that we setwe'll return false so that no more fuzzing cases are generated the getnextpayload function will receive the original payload from the http request that you trapped orif you have selected multiple payload areas in the http requestyou will only receive the bytes that you requested to be fuzzed (more on this laterthis function allows us to fuzz the original test case and then return it so that burp sends the new fuzzed value the last functionreset is there so that if we generate known set of fuzzed requests -say five of them -then for each payload position we have designated in the intruder tabwe will iterate through the five fuzzed values our fuzzer isn' so fussyand will always just keep randomly fuzzing each http request now let' see how this looks when we implement it in python add the following code to the bottom of bhp_fuzzer pyclass bhpfuzzer(iintruderpayloadgenerator)def __init__(selfextenderattack)self _extender extender self _helpers extender _helpers self _attack attack self max_payloads self num_iterations return