Recently, I need to write a custom payload generator in burp's intruder module
Then I googled it and do as the articles from internet, but there are two interface, I don't know what to do.
Should I implement them both or what ?? Can anyone give me an answer??
Yes, you need to implement both to get a working generator. There is an example here. The key parts are:
class IntruderPayloadGenerator implements IIntruderPayloadGenerator
{
...
}
class IntruderPayloadGeneratorFactory implements IIntruderPayloadGeneratorFactory
{
@Override
public IIntruderPayloadGenerator createNewInstance(IIntruderAttack attack)
{
// return a new IIntruderPayloadGenerator to generate payloads for this attack
return new IntruderPayloadGenerator();
}
...
}
callbacks.registerIntruderPayloadGeneratorFactory(IntruderPayloadGeneratorFactory());