Skip to content

SET target

target -l 10.18.9.175 -t 10.10.1.160
target
nmap -p- -A $(target)

/usr/bin/

#!/bin/bash

show_all=false

while getopts l:t:a flag
do
    case "${flag}" in
        l) local_ip=${OPTARG};;
        t) target_ip=${OPTARG};;
        a) show_all=true
    esac
done


if [ "$local_ip" != "" ]; then
    echo $local_ip > "/tmp/local_ip"
fi


if [ "$target_ip" != "" ]; then
    echo $target_ip > "/tmp/target_ip"
fi


if [ "$show_all" == true ]; then
        echo "Local  Ip: $(cat /tmp/local_ip)"
        echo "Target Ip: $(cat /tmp/target_ip)"
else
        cat "/tmp/target_ip"
fi