GEEK STUFF


HostMonster web hosting - 50 GB space 999 GB transfer Raw log files Counters CGI-BIN $4.95 per month

Unlimited Domains • Raw Stat Logs • Counters • CGI-BIN • $4.95 mo.
SIGN UP FOR HostMonster.COM NOW


4NT Code Samples - Page 3

LOOK UP A LIST OF IP ADDRESSES. PUT IP AND URL IN CSV-FORMAT FILE.


This requires 4NT from JP Software.

:   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
)   


GOD ON THE NET

(c) 2006 Rick Reinckens