Create-target: Unterschied zwischen den Versionen

Aus xinux.net
Zur Navigation springen Zur Suche springen
(Die Seite wurde neu angelegt: „#!/bin/bash PORTLIST="9ddce1ae-57e7-11e1-b13c-406186ea4fc5" while read LINE do NAME=$(echo $LINE | cut -f 1 -d :) IP=$(echo $LINE | cut -f 2 -d :) gvm-cli sock…“)
 
Zeile 1: Zeile 1:
 +
*create-target.sh
 +
<pre>
 
#!/bin/bash
 
#!/bin/bash
 
PORTLIST="9ddce1ae-57e7-11e1-b13c-406186ea4fc5"
 
PORTLIST="9ddce1ae-57e7-11e1-b13c-406186ea4fc5"
Zeile 8: Zeile 10:
 
done < $1
 
done < $1
 
~
 
~
 +
</pre>

Version vom 14. September 2020, 12:37 Uhr

  • create-target.sh
#!/bin/bash
PORTLIST="9ddce1ae-57e7-11e1-b13c-406186ea4fc5"
while read LINE
do
NAME=$(echo $LINE | cut -f 1 -d :)
IP=$(echo $LINE | cut -f 2 -d :)
gvm-cli socket --xml "<create_target><name>$NAME-target</name> <hosts>$IP</hosts> <port_list id=\"$PORTLIST\"></port_list> </create_target>"
done < $1
~