Created
July 21, 2010 16:49
-
-
Save rwat/484747 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
; Generate a list of random IPs to be fed into nmap so that nmap may scan | |
; aggressively but not swamp any given subnet within the 172.16.0.0/12 range. | |
; | |
; Licensed under the EPL. (fwiw ;) | |
(use '[clojure.contrib.seq-utils :only (shuffle)] | |
'[clojure.contrib.duck-streams :only (write-lines)]) | |
(write-lines | |
"./ips.txt" | |
(shuffle | |
(for [octet1 [172] | |
octet2 (range 16 33) | |
octet3 (range 256) | |
octet4 (range 256)] | |
(str octet1 \. octet2 \. octet3 \. octet4)))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
(defn ordered-ips [](time %28count %28vec %28for [octet1 [172]
octet2 %28range 16 33%29
octet3 %28range 256%29
octet4 %28range 256%29]
%28str octet1 . octet2 . octet3 . octet4%29%29%29%29))