From b0303ac8831b58f20689b28ceaab6c9d495092f4 Mon Sep 17 00:00:00 2001 From: jay Date: Sat, 31 May 2014 10:34:11 +0000 Subject: [PATCH] Add randomizer to configure script so that a random ASCII art from docs/leet-nmap-ascii-art*.txt is printed --- configure | 21 +++++++++++++++++++-- todo/nmap.txt | 7 ++++--- 2 files changed, 23 insertions(+), 5 deletions(-) diff --git a/configure b/configure index 87bee60d4..b9a64e591 100755 --- a/configure +++ b/configure @@ -9392,7 +9392,24 @@ $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;} fi # Krad ASCII ART#!#@$!@#$ -if test -f docs/leet-nmap-ascii-art.txt; then - cat docs/leet-nmap-ascii-art.txt +# Randomly store the name of one of the ASCII Art files in FILENAME +FILENAME=`ls docs/leet-nmap-ascii-art*.txt 2>/dev/null | awk ' + BEGIN { + srand(); + } + + { + lines[++d] = $0 + } + + END { + # This makes AWKs random numbers more random + print lines[int(rand()*49139)%d+1]; + } + '` +# Print the file to screen, if any such file exists (i.e. $FILENAME is not empty) +if test "$FILENAME"; then + cat "$FILENAME" fi + echo "Configuration complete. Type make (or gmake on some *BSD machines) to compile." diff --git a/todo/nmap.txt b/todo/nmap.txt index 23939e43b..234f347e0 100644 --- a/todo/nmap.txt +++ b/todo/nmap.txt @@ -74,9 +74,6 @@ o GSOC 2014 student Jay will be looking at these items: topology view. http://seclists.org/nmap-dev/2012/q1/82 has a patch, however it doesn't handle the case of two or more consecutive timeouts. - o Add randomizer to configure script so that a random ASCII art from - docs/leet-nmap-ascii-art*.txt is printed. I think I'll start naming - them leet-nmap-ascii-art-submittername.txt. o Provide an option to send a comment in scan packet data for target network. Examples: --comment "Scan conducted by Marc Reis from SecOps, extension 2147" or --comment "pH33r my l3eT @@ -832,6 +829,10 @@ o random tip database DONE: +o Add randomizer to configure script so that a random ASCII art from + docs/leet-nmap-ascii-art*.txt is printed. I think I'll start naming + them leet-nmap-ascii-art-submittername.txt. + o Add IPv6 subnet/pattern support like we offer for IPv4. o OK, we now have the subnet/pattern support, but not the two-stage model discussed below. So we added a separate task for that.