Hallo Eero -
Did this...
echo "<create_target>" > foo.xml
cat original-xml-dump.xml >> foo.xml
echo "</create_target>" >> foo.xml
cat foo.xml | omp -u username -w password -X -
getting this...
d><page>58</page></task_count></get_tasks_response></create_target>
(omp:5670): lib serv-WARNING **: Failed to write to server: Error in the push
function.
(omp:5670): lib serv-WARNING **: Failed to gnutls_bye: Error in the push
function.
Failed to send_to_manager.
Any idea???
Thx, Ralf
Mit freundlichen Grüßen, Best Regards
___________________________________________
Paysquare SE
Ralf K. Wiegand
Mainzer Landstrasse 201
60326 Frankfurt am Main
Telefon: +49(0) 69 801095 -203
Telefax: +49(0) 69 801095-120
[email protected]
www.paysquare.eu
www.montrada.de
Sitz der Gesellschaft: Utrecht, NL
Chamber of Commerce No. 30196418
Sitz der Niederlassung: Frankfurt am Main, DE HRB 98583, Frankfurt am Main
Vorstand: Jan Sonneveld, Petra Gerla, Huib Klarenbeek
This e-mail may contain confidential and/or privileged information. If you are
not the intended recipient (or have received this e-mail in error) please
notify the sender immediately and destroy this e-mail. Any unauthorised
copying, disclosure or distribution of the material in this e-mail is strictly
forbidden.
Diese E-Mail enthält vertrauliche und/oder rechtlich geschützte Informationen.
Wenn Sie nicht der richtige Adressat sind oder diese E-Mail irrtümlich erhalten
haben, informieren Sie bitte sofort den Absender und vernichten Sie diese Mail.
Das unerlaubte Kopieren sowie die unbefugte Weitergabe dieser Mail ist nicht
gestattet.
-----Ursprüngliche Nachricht-----
Von: [email protected] [mailto:[email protected]] Im Auftrag
von Eero Volotinen
Gesendet: Dienstag, 7. April 2015 10:01
An: Wiegand, Ralf
Cc: [email protected]
Betreff: Re: [Openvas-discuss] Importing openvas/greenbone targets
I didn't find any way to import xml back in greenbone interface (GUI).
--
Eero
2015-04-07 10:17 GMT+03:00 Eero Volotinen <[email protected]>:
Well, targets? You mean ip addresses?
You could just dump target xml file and than reimport it with omp (cli)
tool
you just need to wrap <create_target> original-xml </create_target>
like this
echo "<create_target>" > foo.xml
cat original-xml-dump.xml >> foo.xml
echo "</create_target>" >> foo.xml
cat foo.xml | omp -u username -w password -X -
or use just sane way to recreate targets from text file like this:
#/bin/bash
## create targets with all tcp port ranges from hostnames.txt
## -u admin_username -w admin-password
PORTS=`omp -u username -w password -iX '<get_port_lists/>' |grep -B4
"All TCP<" |grep id | awk -F\" '{ print $2 }'`
for i in `cat hostnames.txt`
do
echo "<create_target><name>Target $i</name><hosts>$i</hosts>"
echo "<port_list id=\"$PORTS\"/>"
echo "</create_target>"
done | omp -u username -w password -X -
br,
Eero
2015-04-07 9:11 GMT+03:00 Wiegand, Ralf <[email protected]>:
@all - Hello. Need some help with - on how to import xml
exported targets into new Openvas install using Greenbone interface. I saw the
import of the xml files in some docu, but I can't find it on my Greenbone GUI.
Thanks for your help
Mit freundlichen Grüßen, Best Regards
___________________________________________
Paysquare SE
Ralf K. Wiegand
Mainzer Landstrasse 201
60326 Frankfurt am Main
Telefon: +49(0) 69 801095 -203
<tel:%2B49%280%29%2069%20801095%20-203>
Telefax: +49(0) 69 801095-120
<tel:%2B49%280%29%2069%20801095-120>
[email protected]
www.paysquare.eu
www.montrada.de
Sitz der Gesellschaft: Utrecht, NL
Chamber of Commerce No. 30196418
Sitz der Niederlassung: Frankfurt am Main, DE HRB 98583,
Frankfurt am Main
Vorstand: Jan Sonneveld, Petra Gerla, Huib Klarenbeek
This e-mail may contain confidential and/or privileged
information. If you are not the intended recipient (or have received this
e-mail in error) please notify the sender immediately and destroy this e-mail.
Any unauthorised copying, disclosure or distribution of the material in this
e-mail is strictly forbidden.
Diese E-Mail enthält vertrauliche und/oder rechtlich geschützte
Informationen. Wenn Sie nicht der richtige Adressat sind oder diese E-Mail
irrtümlich erhalten haben, informieren Sie bitte sofort den Absender und
vernichten Sie diese Mail. Das unerlaubte Kopieren sowie die unbefugte
Weitergabe dieser Mail ist nicht gestattet.
_______________________________________________
Openvas-discuss mailing list
[email protected]
https://lists.wald.intevation.org/cgi-bin/mailman/listinfo/openvas-discuss
_______________________________________________
Openvas-discuss mailing list
[email protected]
https://lists.wald.intevation.org/cgi-bin/mailman/listinfo/openvas-discuss