: IP_LOOKUP
: by Joseph "Rick" Reinckens
: Please visit www.GodOnThe.Net
:
: This requires 4NT from www.JPSoft.com
: Usage: IP_LOOKUP list_file_name output_file_name
: Source file, one IP per line: 21.69.0.71
: Output file, one per line: 21.69.0.71,www.abcdef.com
: This is CSV (comma separated values) format.
: This also prints a count, the IP and the URL to the screen.
: When copying this, don't forget to include the closing paren
: below the final line of text.
@echo off
color red on bright white
cls
set cnt=0
: %1 = name of IP source file
: %2 = name of output file CSV file with IPNUM,URL
for /f %a in (%1) (
set url=%@ipname[%a]
set cnt=%@inc[%cnt]
echo %cnt %@left[18, %a%@repeat[ ,8]]%url
echo %a,%url>>%2
)