| #!/bin/sh |
| |
| |
| t_Log "Running $0 - nmap querys eth0 and checks for open ssh-port" |
| |
| |
| IP=$(ip -f inet addr list eth0 | grep 'inet ') |
| regex='.*inet\ (.*)\/.*' |
| if [[ $IP =~ $regex ]] |
| then |
| t_Log "Found eth0 IP - starting nmap test" |
| nmap ${BASH_REMATCH[1]} | grep -iq ssh |
| fi |
| |
| t_CheckExitStatus $? |