From faf7fa43d6dd30dfa557dedcd4e5db69d0fdf4b8 Mon Sep 17 00:00:00 2001 From: bert hubert Date: Fri, 29 Sep 2017 08:07:53 +0200 Subject: [PATCH] add --www feature to dnsbulktest to make it (not) add www. to everything too --- pdns/dnsbulktest.cc | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/pdns/dnsbulktest.cc b/pdns/dnsbulktest.cc index c17713dd66..be0221d31c 100644 --- a/pdns/dnsbulktest.cc +++ b/pdns/dnsbulktest.cc @@ -224,6 +224,7 @@ try ("type,t", po::value()->default_value("A"), "What type to query for") ("envoutput,e", "write report in shell environment format") ("version", "show the version number") + ("www", po::value()->default_value("true"), "duplicate all queries with an additional 'www.' in front") ; po::options_description alloptions; @@ -258,6 +259,7 @@ try return EXIT_FAILURE; } + bool doWww = g_vm["www"].as(); g_quiet = g_vm.count("quiet") > 0; g_envoutput = g_vm.count("envoutput") > 0; uint16_t qtype; @@ -303,7 +305,8 @@ try continue; // this was an IP address } domains.push_back(TypedQuery(split.second, qtype)); - domains.push_back(TypedQuery("www."+split.second, qtype)); + if(doWww) + domains.push_back(TypedQuery("www."+split.second, qtype)); } cerr<<"Read "<