summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorMarco d'Itri <md@linux.it>2015-12-08 08:38:50 +0100
committerMarco d'Itri <md@linux.it>2015-12-08 08:38:50 +0100
commit718ae61ae551c72defdbe774d4958c687c6f976f (patch)
treecdcbc3f59ca7ad5bdee6c25fe24bd722e92e08df /Makefile
parente143980234a904b9123bb00fc209b17ec3c3d93f (diff)
downloadwhois-718ae61ae551c72defdbe774d4958c687c6f976f.tar.gz
Support american fuzzy lop
When built with AFL_MODE set to true, whois will use the first line of standard input as command line parameters and the rest as network input.
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile13
1 files changed, 13 insertions, 0 deletions
diff --git a/Makefile b/Makefile
index 8d8f69b..2634a9a 100644
--- a/Makefile
+++ b/Makefile
@@ -97,6 +97,19 @@ servers_charset.h: servers_charset_list make_servers_charset.pl
$(PERL) make_servers_charset.pl < $< > $@
##############################################################################
+afl:
+ $(MAKE) whois \
+ CC=afl-gcc AFL_HARDEN=1 \
+ HAVE_LIBIDN=1 HAVE_ICONV=1 DEFS=-DAFL_MODE=1
+
+afl2:
+ $(MAKE) whois \
+ HAVE_LIBIDN=1 HAVE_ICONV=1 DEFS=-DAFL_MODE=1
+
+afl-run:
+ nice afl-fuzz -i ../afl_in -o ../afl_out -- ./whois
+
+##############################################################################
install: install-whois install-mkpasswd install-pos
install-whois: whois