i have been trying to get this peice of code to work but i cant seem to get it to work.
im just starting out coding and kinda poking around in the dark to get this resolved, any help would be much appriciated, thankyou
Quote:
#!/bin/bash
echo "Would you like to scan using nmap or hping?"
read scanner
if "$scanner" = "nmap" : then
echo "Enter the starting IP address :"
read FirstIP
echo "Enter the last IP address :"
read LastIP
echo "Enter the port number you want to scan for :"
read port
nmap -sT $FirstIP-$LastIP -p $port -oG web
cat web | grep open > web1
cat web1 | cut -f2 -d ":" | cut -f1 -d "(" > web2
cat web2
elit
echo "Which IP address would you like to scan?"
read IPaddress
echo echo "What port would you like to scan for ?"
read hpingport
echo "How many packets would you like to send?"
read packets
hping3 -c $packets $IPaddress -p $hpingport > hpingscan
cat hpingscan
thankyou for any help