Alas, I could not make Magic Banana's script for generating reandomized IPv4
addresses work;
most certainly by my failure to comprehend what's going on sufficiently. I
tried constructing
an od script, but the best I could do was to generate 3rd & 4th octets which
violate the 255
maxiumum of the two-byte octets with no clear way of limiting the decimal
equivalent octets.
So I involved that famous, but maligned search engine, Google, where I found
this gem:
https://stackoverflow.com/questions/24059607/nmap-taking-a-random-sample-from-a-range-of-ip-ranges-is-combining-ir-and
where it's said:
nmap -n -sL -iL ip_ranges -oG - | awk '/^Host/{print $2}' | shuf -n
100000
I tried that script out, but it looks up all the IP addresses in the entire
CIDR block first and then shuffles
the results before selecting a modest number of them ... after we have had to
wait for the resolution of them all.
But there's a better one leading the way:
https://unix.stackexchange.com/questions/455081/how-does-this-script-generate-an-ip-address-randomly
where it's said:
nmap -n -iR 10 -sL | awk '/report for/ { print $NF }'
but that's apparently all that any of the many nmap scripts are written to
do.
Then it dawned on me that I could pinch the 3rd and 4th octets and graft them
onto the first two octets of
my recent-visitor data's collected and not-looked-up IPv4 addresses:
sudo nmap -n -iR 2286000 -sL | awk '/report for/ { print $NF }' - | sed
's/\./\t/g' '-' | awk '{print $3"."$4}' '-' > Octets.3and4.File01.txt
awk '{ for (i = 0; ++i