Closed HelloXiaoHe closed 6 years ago
You have used the wrong socket. Default for sockpath is "/usr/local/var/run/openvasmd.sock". You have to look where your openvasmd.sock exist.
thanks,it works,i find my openvasmd.sock
find / -name openvasmd.sock
/run/openvasmd.sock
then I try again
./gvm-cli socket --gmp-username admin --gmp-password 123456 --sockpath /run/openvasmd.sock --xml "
it return the right response
then I get the config_id
./gvm-cli socket --gmp-username admin --gmp-password 123456 --sockpath /run/openvasmd.sock --xml "
./gvm-cli socket --gmp-username admin --gmp-password 123456 --sockpath /run/openvasmd.sock --xml "
but it return Connection was closed by remote server
According to http://docs.greenbone.net/API/OMP/omp-7.0.html#command_create_task and http://docs.greenbone.net/GSM-Manual/gos-4/en/omp.html#activating-the-gmp-protocol you have to add at least a target id and a config id.
F.e.:
--xml "
@HelloXiaoHe I would suggest to move this discussion over to http://lists.wald.intevation.org/cgi-bin/mailman/listinfo/openvas-discuss as also advised in https://github.com/greenbone/openvas-scanner/issues/71
This avoids that the information here gets lost within a bugtracker and is archived within the mailinglist.
it return ,Connection was closed by remote server @rgrewe I find the answer I see the log ,/var/log/openvas/openvassmd.log,it have some error md omp: INFO:2018-04-23 06h06.25 UTC:72488: Failed to parse client XML: Error on line 1 char 167: Odd character '0', expected an open quote mark after the equals sign when giving value for attribute 'id' of element 'target'
the interpunction is wrong,I use single quotes instead of double quotation marks “”
@cfi-gb hi, my English is poor,I dont know how to use the mailinglist,do you mean that I would sent the email with the discussion?
hi, I successfully installed openvas and gvm-tools.
cd /usr/local/python3.6.5/bin run ./gvm-cli socket --gmp-username admin --gmp-password 123456 --sockpath /run/redis/redis.sock --xml "Suspect Host 10.17.2.137 "
it return , timed out
and find the User Manuals , http://docs.greenbone.net/GSM-Manual/gos-4/en/omp.html#activating-the-gmp-protocol http://docs.greenbone.net/GSM-Manual/gos-4/en/systemadministration.html#gmp
but I cant find the menu