Tuesday, October 19, 2010

Port Scan in RedHat /CentOS /Fedora /Ubuntu

#HOST=127.0.0.1;for((port=1;port<=65535;++port));do echo -en "$port ";if echo -en "open $HOST $port\nlogout\quit" | telnet 2>/dev/null | grep 'Connected to' > /dev/null;then echo -en "\n\nport $port/tcp is open\n\n";fi;done

if you need pls change ipaddress and you can add more number 65535 

No comments: