Closed falegk closed 6 years ago
The GVMConnection
class honors a raw_response
attribute which will cause the read
method to return the 'raw' XML @falegk describe. With this attribute set, the examples provided should result in
<omp_response status="400" status_text="First command must be AUTHENTICATE, COMMANDS or GET_VERSION"/>
and
<get_tasks_response status="404" status_text="Failed to find task '1515'"/>
respectively.
So to solve this part, it would be sufficient to provide a command line setting to gvm-cli
to control the raw_response
attribute used when establishing the connection.
And I agree that showing both error and backtrace is a bit weird and should be improved. :)
I have created #79 for the raw XML response part.
Should be fixed with #79
When I run a command that failed, a traceback displayed before the error message.
Expected behavior
It must be returns an xml response or only the error message.
Current behavior
It returns the python traceback
Steps to reproduce
gvm-cli tls --hostname=localhost --xml "<get_tasks/>" --gmp-username 'admin' --gmp-password 'wrongpass'
or run
gvm-cli tls --hostname=localhost --xml "<get_tasks task_id='1515'/>" --gmp-username 'admin' --gmp-password 'correctpass'
GVM versions
gsa: (gsad --version)
gvm: Greenbone Vulnerability Manager 8.0+beta1 Manager DB revision 191 & OpenVAS Manager 7.0.3 Manager DB revision 184
openvas-scanner: OpenVAS Scanner 6.0+beta1 & OpenVAS Scanner 5.1.2
gvm-libs:
gvm-tools: gvm-cli 1.4.1
Environment
Operating system: Ubuntu 16.04.5 LTS
Installation method / source: source installation