After a good night's sleep, and while still waiting from some very slow nMap scans to finish, I found a roundabout way of separating those pesky IPv4 addresses from the source list without accidentally
dismembering any PTR's that deserve to be treated differently later.

Start here with the fourth script from my June 22 posting, applied globally, but with a larger original
source file, one-tenth of the Recent Visitors collection:
grep -Eo '[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}' SourceList.0pt1.txt > IPv4-ListB.txt

Continue with my two-minute drill, adding a modified fourth script from June 22: awk '{print $1}' 'SourceList.0pt1.txt' | sed 's/\./\t/g' '-' | awk '{print $1"."$2"."$3"."$4"$"$5}' '-' > IPv4-ListC.txt; grep -Eo '[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\$' IPv4-ListC.txt | tr -d $ | sort -nrk 1 > IPv4-Only-List.txt

Use comm to match IPv4-Only-List.txt with SourceList.0pt1.txt
sort -k 1 SourceList.0pt1.txt > Temp0623B.txt; sort -k 1 IPv4-Only-List.txt > Temp0623C.txt; comm -12 Temp0623B.txt Temp0623C.txt > Clean.IPv4-List.txt ; rm Temp0623B.txt Temp0623C.txt

The IPv4 addresses found in Clean.IPv4-List.txt look OK to me; however, there should be an effort to come up with
a verification script.

Try grep:
grep -hf Clean.IPv4-List.txt SourceList.0pt1.txt |more
This script starts out OK, with a nice list of IPv4 addresses, but soon turns into a memory hog
that has to be stopped.

George Langford

Reply via email to