All pastes #967391 Raw Edit

Unbenannt

public text v1 · immutable
·published 2008-04-02 11:50 UTC
rendered paste body


scan_singleport(){
        PORT="$1"
        set -xe
        RESULT=dummy
        RESULT="`/usr/bin/nmap -S $SOURCE $PROTOCOL $NMAP_OPTIONS -p $PORT $TARGET 2>&1 |grep -v 'WARNING:  -S will only affect' | grep -v Starting | grep open`"


       #if [ "`echo \"$RESULT\" | grep \"$PORT\" |grep open`" ];then
       #        echo "TARGET $TARGET Port $PORT Protocol $PROTOCOL_TYPE open"
       # else
       #        echo "TARGET $TARGET Port $PORT Protocol $PROTOCOL_TYPE closed"
       # fi
       echo FOOBAR
}

########### RESULT ###############

+ RESULT=dummy
++ grep -v 'WARNING:  -S will only affect'
++ grep -v Starting
++ /usr/bin/nmap -S 123.123.0.1 -sT -q -r -e eth0:0 -P0 --open -T Aggressive -p 8081 123.123.160.58
++ grep open
+ RESULT=