Hi,

On 31.03.2017 01:28, Justin Farmer wrote:
> 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

i can't help you with your issue but just want to point out that you're
looking at a quite too old version of the OMP protocol. The OMP Protocol
in OpenVAS 8 is at 6.0:

http://www.openvas.org/omp-6-0.html

where OpenVAS 9 is at 7.0:

http://docs.greenbone.net/API/OMP/omp-7.0.html

Both doesn't contain a reference to your mentioned rcfile. The links can
be found here:

http://www.openvas.org/protocol-doc.html

Regards,

-- 

Christian Fischer | PGP Key: 0x54F3CE5B76C597AD
Greenbone Networks GmbH | http://greenbone.net
Neumarkt 12, 49074 Osnabrück, Germany | AG Osnabrück, HR B 202460
Geschäftsführer: Lukas Grunwald, Dr. Jan-Oliver Wagner
_______________________________________________
Openvas-discuss mailing list
[email protected]
https://lists.wald.intevation.org/cgi-bin/mailman/listinfo/openvas-discuss

Reply via email to