How the scanner is going to work is: I will have the user enter a host (%h%) and the port's he wants to scan. (%p%) The program will then attempt to connect using telnet to %h% using the command:
- Code: Select all
telnet %h% %p%
But how do I tell the user which ports are open and closed?
What I have so far is this:
@echo off
:start
title Batch Port Scanner
color 0a
echo ***********************************
echo Enter the host you want to scan:
set /p h=
echo ************************************
goto port
:port
cls
echo *************************************
echo Enter the Ports you wish to scan on this machine:
set /p p=
echo *************************************
echo Any More? (Y/N)
set /p 0=
if %0%==n goto portscan
if %0%==y goto ports
:ports
echo Enter the ports you want to scan. The limit is 10.
set /p 1=
set /p 2=
set /p 3=
set /p 4=
set /p 5=
set /p 6=
set /p 7=
set /p 8=
set /p 9=
set /p b=
goto portscan
:portscan
cls
pause
telnet %h% %0%
telnet %h% %1%
telnet %h% %2%



