Create-target

Aus xinux.net
Zur Navigation springen Zur Suche springen
  • 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
~