Skip to content

Commit db74456

Browse files
author
soffensive
committed
Add hint to change XML encoding behavior in case of unsuccessful attempt
1 parent 5a097c7 commit db74456

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

lib/controller/controller.py

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@
5656
from lib.core.enums import NOTE
5757
from lib.core.enums import PAYLOAD
5858
from lib.core.enums import PLACE
59+
from lib.core.enums import POST_HINT
5960
from lib.core.exception import SqlmapBaseException
6061
from lib.core.exception import SqlmapConnectionException
6162
from lib.core.exception import SqlmapNoneDataException
@@ -711,6 +712,16 @@ def start():
711712
if not conf.randomAgent:
712713
errMsg += " and/or switch '--random-agent'"
713714

715+
if kb.postHint in (POST_HINT.SOAP, POST_HINT.XML):
716+
if conf.skipXmlEncode:
717+
errMsg += ". Also, you can try to rerun by omitting the "
718+
errMsg += "option '--skip-xmlencode' as the target may "
719+
errMsg += "require proper XML encoding of payload data"
720+
else:
721+
errMsg += ". Also, you can try to rerun by providing the "
722+
errMsg += "option '--skip-xmlencode' as the target may "
723+
errMsg += "not require XML encoding of payload data"
724+
714725
raise SqlmapNotVulnerableException(errMsg.rstrip('.'))
715726
else:
716727
# Flush the flag

0 commit comments

Comments
 (0)