Home page logo
/

nmap-dev logo Nmap Development mailing list archives

Re: Review: Angry IP Scanner
From: doug () hcsw org
Date: Fri, 6 Jun 2008 00:28:31 -0700

On Fri, Jun 06, 2008 at 02:05:52AM +0000 or thereabouts, Brandon Enright wrote:
I'm not aware of any generic algorithm, method, or technique that could
generate numbers in some arbitrary set of ranges without duplicates
that is both fast and memory efficient.

Out-of-core sorting. Here's what I do if I need a random ordering of
10+ million records:

cat input | perl -ne 'print int(rand()*99999999)." $_"' | sort -n | perl -ne 's/^\d+ // and print' > output

I call it the frax0r-shuffle (tm) patentz pending all rights reserved ;)

Doug

PS. There are ways of pipelining operations in and improving disk
IO but I think I've given the script kidz too much info already.

Attachment: signature.asc
Description: Digital signature


_______________________________________________
Sent through the nmap-dev mailing list
http://cgi.insecure.org/mailman/listinfo/nmap-dev
Archived at http://SecLists.Org

  By Date           By Thread  

Current thread:
[ Nmap | Sec Tools | Mailing Lists | Site News | About/Contact | Advertising | Privacy ]
AlienVault