# # trap any signals and exit # trap 'exec true' 1 2 3 15 # # log it # echo "nmap [$$]: $USER at" `date` >> nmap1.log # # ask for nmap options # echo 'Options to nmap, please (list on one line; quit to end): ' read OPTIONS # # if it isn't quit, run it # use exec here to overlay login shell # so it exits rather than prompts # if test x"$OPTIONS" != "xquit" then echo nmap \[$$\] `date` "$USER options $OPTIONS" >> nmap2.log exec /home/nmap/run $OPTIONS else exec true fi # # should never get here # echo "nmap [$$]: *** got in at" `date` >> nmap1.log