I’m using a Ruby wrapper to interact with my OV scanner and now trying to
import a config file using OMP. However, I’m getting an error from the
openvasmd.log: “Scan config could not be created by admin”. My Ruby wrapper
mimics what openvas is looking
for:(http://www.openvas.org/omp-2-0.html#command_create_config
<http://www.openvas.org/omp-2-0.html#command_create_config>
<http://www.openvas.org/omp-2-0.html#command_create_config
<http://www.openvas.org/omp-2-0.html#command_create_config>>). I assume this
is because I’m trying to upload an .xml config file and not an rcfile which
both seem to be looking for. Basically, I’ve created my own scan config and
then downloaded the XML file through GSA. My goal is to allow other nodes I
manage to use this config. The Ruby wrapper is looking for the rcfile too:
# rcfile should be base64 encoded
def config_create (name,rcfile)
xmlreq=xml_attr("create_config",
{"name"=>name,"rcfile"=>rcfile}).to_s()
begin
xr=omp_request_xml(xmlreq)
id=xr.elements['create_config_response'].attributes['id']
return id
rescue
raise OMPResponseError
end
end
At this point, I’m not sure what to do. Is an rcfile and scan config xml file
one in the same? If not, how do I make an rcfile out of a given scan config
xml file?
I’ve also tried to use straight omp from the command line to try:
cat ScanConfig.xml | omp -v -h 127.0.0.1 -u admin -w password -p 9390 -X -
But that throws the following error after running through the cat command:
(omp:23629) lib serv-WARNING **: Failed to write to server: Error in the push
function
(omp:23629) lib serv-WARNING **: Failed to gnutls_bye: Error in the push
function
Failed to send_to_manager
Thx,
Justin
_______________________________________________
Openvas-discuss mailing list
[email protected]
https://lists.wald.intevation.org/cgi-bin/mailman/listinfo/openvas-discuss