Hello,
I scan the code with SonarCloud and found 3 interesting bugs reported.
There is a conditional expression that is copy/pasted 3 times that is always returning the value of conf.method whatever the results of the conditional expression:
(conf.method if conf.method != HTTPMETHOD.GET else conf.method)
The files impacted here:

Example on lib/controller/controller.py:

One can look at the results directly here: https://sonarcloud.io/project/issues?id=agigleux_sqlmap&languages=py&open=AXNWC5usfcjDL5qbLEcX&resolved=false&rules=python%3AS3923&severities=MAJOR&types=BUG
If I understand well the code, I believe the expression:
((conf.method if conf.method != HTTPMETHOD.GET else conf.method) or HTTPMETHOD.POST)
could be simplified to:
((HTTPMETHOD.POST if conf.method is None else conf.method))
Hello,
I scan the code with SonarCloud and found 3 interesting bugs reported.
There is a conditional expression that is copy/pasted 3 times that is always returning the value of
conf.methodwhatever the results of the conditional expression:(conf.method if conf.method != HTTPMETHOD.GET else conf.method)The files impacted here:
Example on lib/controller/controller.py:
One can look at the results directly here: https://sonarcloud.io/project/issues?id=agigleux_sqlmap&languages=py&open=AXNWC5usfcjDL5qbLEcX&resolved=false&rules=python%3AS3923&severities=MAJOR&types=BUG
If I understand well the code, I believe the expression:
((conf.method if conf.method != HTTPMETHOD.GET else conf.method) or HTTPMETHOD.POST)could be simplified to:
((HTTPMETHOD.POST if conf.method is None else conf.method))