Skip to content

Target

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

/usr/bin/target

#!/bin/bash

while getopts s:t:h flag
do
    case "${flag}" in
        s) target_ip=${OPTARG};;
        t) target_ip=${OPTARG};;
        h) target_ip=${OPTARG};;
    esac
done


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

cat "/tmp/target_ip"

OTHER

export IP=10.0.2.5
export PORTS=$(cat nmap.scan.nmap | grep 'open' | awk -F/ '{print $1}' ORS=',';echo)
echo $IP
echo $PORTS