@echo off SET ONECHECK=%1EMPTY SET TWOCHECK=%2EMPTY SET MAXPORT=65535 IF %ONECHECK%==EMPTY goto help IF NOT %TWOCHECK%==EMPTY set MAXPORT=%2 goto doit :help echo NMAP full port scan wrapper 1.0.0 echo. echo Usage: echo nmapfull target [port] echo. echo Will scan ports 0 to port on target, TCP and UDP echo Will attempt to determine service names and versions for any open ports echo Will attempt to determine target operating system echo Will write results to "nmap-TARGET.p0-PORT.txt" goto end :doit nmap -A -vv -D google.com -oN nmap-%1.p0-%MAXPORT%.txt %1 -P0 -sV -sSU -O --version-all -r -p0-%MAXPORT% :end