aboutsummaryrefslogtreecommitdiffstats
path: root/dns
diff options
context:
space:
mode:
authorpawel <pawel@FreeBSD.org>2016-05-29 19:33:33 +0800
committerpawel <pawel@FreeBSD.org>2016-05-29 19:33:33 +0800
commit1cd7cbcc43d53e3cff461233f5305bea3b571482 (patch)
treecc7bdee2219bf14cdd15a35730c3796913b47c50 /dns
parentb54c75854a7d56618da3e4d2717a669c7b269acf (diff)
downloadfreebsd-ports-gnome-1cd7cbcc43d53e3cff461233f5305bea3b571482.tar.gz
freebsd-ports-gnome-1cd7cbcc43d53e3cff461233f5305bea3b571482.tar.zst
freebsd-ports-gnome-1cd7cbcc43d53e3cff461233f5305bea3b571482.zip
Multithreaded perl script to enumerate DNS information
of a domain and discover non-contiguous IP blocks. OPERATIONS: Get the host's address (A record). Get the nameservers (threaded). Get the MX record (threaded). Perform axfr queries on nameservers and get BIND VERSION (threaded). Get extra names and subdomains via google scraping (google query = "allinurl: -www site:domain"). Brute force subdomains from file, can also perform recursion on subdomain that have NS records (all threaded). Calculate C class domain network ranges and perform whois queries on them (threaded). Perform reverse lookups on netranges ( C class or/and whois netranges) (threaded). Write to domain_ips.txt file ip-blocks. WWW:https://github.com/fwaeytens/dnsenum PR: 208950 Submitted by: Rihaz Jerrin <rihaz.jerrin@gmail.com>
Diffstat (limited to 'dns')
-rw-r--r--dns/Makefile1
-rw-r--r--dns/dnsenum/Makefile43
-rw-r--r--dns/dnsenum/distinfo2
-rw-r--r--dns/dnsenum/files/patch-dnsenum.pl32
-rw-r--r--dns/dnsenum/pkg-descr21
5 files changed, 99 insertions, 0 deletions
diff --git a/dns/Makefile b/dns/Makefile
index 67b0bbf8fd25..ffb8af72431b 100644
--- a/dns/Makefile
+++ b/dns/Makefile
@@ -37,6 +37,7 @@
SUBDIR += dnscrypt-wrapper
SUBDIR += dnsdbck
SUBDIR += dnsdist
+ SUBDIR += dnsenum
SUBDIR += dnsflood
SUBDIR += dnshistory
SUBDIR += dnsjava
diff --git a/dns/dnsenum/Makefile b/dns/dnsenum/Makefile
new file mode 100644
index 000000000000..62506eca2f48
--- /dev/null
+++ b/dns/dnsenum/Makefile
@@ -0,0 +1,43 @@
+# $FreeBSD$
+
+PORTNAME= dnsenum
+PORTVERSION= 1.2.4.2
+CATEGORIES= dns
+
+MAINTAINER= rihaz.jerrin@gmail.com
+COMMENT= Enumerate DNS information and discover non-contiguous IP blocks
+
+LICENSE= GPLv2
+
+RUN_DEPENDS= p5-Net-IP>=0:net-mgmt/p5-Net-IP \
+ p5-Net-DNS>=0:dns/p5-Net-DNS \
+ p5-Net-Netmask>=0:net-mgmt/p5-Net-Netmask \
+ p5-Net-Whois>=0:net/p5-Net-Whois \
+ p5-HTML-Parser>=0:www/p5-HTML-Parser \
+ p5-WWW-Mechanize>=0:www/p5-WWW-Mechanize \
+ p5-XML-Writer>=0:textproc/p5-XML-Writer \
+ p5-String-Random>=0:devel/p5-String-Random
+
+USE_GITHUB= yes
+GH_ACCOUNT= fwaeytens
+
+USES= perl5 shebangfix
+SHEBANG_FILES= ${WRKSRC}/dnsenum.pl
+
+NO_BUILD= yes
+NO_ARCH= yes
+
+PLIST_FILES= bin/dnsenum \
+ ${DOCSDIR_REL}/README \
+ ${DOCSDIR_REL}/INSTALL.txt \
+ ${DATADIR_REL}/dns.txt
+
+do-install:
+ ${INSTALL_SCRIPT} ${WRKSRC}/dnsenum.pl ${STAGEDIR}${PREFIX}/bin/dnsenum
+ ${MKDIR} ${STAGEDIR}${DATADIR}
+ ${MKDIR} ${STAGEDIR}${DOCSDIR}
+ ${INSTALL_DATA} ${WRKSRC}/README.md ${STAGEDIR}${DOCSDIR}/README
+ ${INSTALL_DATA} ${WRKSRC}/INSTALL.txt ${STAGEDIR}${DOCSDIR}
+ ${INSTALL_DATA} ${WRKSRC}/dns.txt ${STAGEDIR}${DATADIR}
+
+.include <bsd.port.mk>
diff --git a/dns/dnsenum/distinfo b/dns/dnsenum/distinfo
new file mode 100644
index 000000000000..4328daad60f2
--- /dev/null
+++ b/dns/dnsenum/distinfo
@@ -0,0 +1,2 @@
+SHA256 (fwaeytens-dnsenum-1.2.4.2_GH0.tar.gz) = e8a18035a6e00b81430edb4a969ef5043ef39984f3a6b0629b83c8fecf9bf007
+SIZE (fwaeytens-dnsenum-1.2.4.2_GH0.tar.gz) = 20000
diff --git a/dns/dnsenum/files/patch-dnsenum.pl b/dns/dnsenum/files/patch-dnsenum.pl
new file mode 100644
index 000000000000..2ab934eab062
--- /dev/null
+++ b/dns/dnsenum/files/patch-dnsenum.pl
@@ -0,0 +1,32 @@
+--- dnsenum.pl.orig 2016-04-22 00:50:16 UTC
++++ dnsenum.pl
+@@ -58,6 +58,8 @@ use Net::Netmask;
+ use XML::Writer;
+ use Socket;
+ use String::Random;
++no if $] >= 5.017011, warnings => 'experimental::smartmatch';
++
+
+ my ($ithreads_support, $whois_support, $mech_support, $html_support,$xml_support);
+
+@@ -71,7 +73,7 @@ my ($domain, $recur, $table, $extend_b,
+ my ($timeout, $delay, $pages, $ipcount, $ipvalid) = (10, 3, 5, 0, 0);
+ my ($output);
+ my $writer;
+-my $program = 'dnsenum.pl';
++my $program = 'dnsenum';
+ my $string_gen = String::Random->new;
+ my $wildcards = $string_gen->randpattern("cccccccccccc");
+ my @wildcardaddress;
+@@ -176,11 +178,6 @@ if ($whois && !defined $whois_support) {
+ "whois queries disabled.\n";
+ $whois = undef;
+ }
+-if ($whois && !defined $whois_support) {
+- warn "Warning: can't load Net::Whois::IP module, ".
+- "whois queries disabled.\n";
+- $whois = undef;
+-}
+ if ($output && !defined $xml_support) {
+ warn "Warning: can't load XML::Writer module, ".
+ "xml output disabled.\n";
diff --git a/dns/dnsenum/pkg-descr b/dns/dnsenum/pkg-descr
new file mode 100644
index 000000000000..824f76d12132
--- /dev/null
+++ b/dns/dnsenum/pkg-descr
@@ -0,0 +1,21 @@
+Multithreaded perl script to enumerate DNS information
+of a domain and discover non-contiguous IP blocks.
+
+OPERATIONS:
+ Get the host's address (A record).
+ Get the nameservers (threaded).
+ Get the MX record (threaded).
+ Perform axfr queries on nameservers and
+ get BIND VERSION (threaded).
+ Get extra names and subdomains via google
+ scraping (google query = "allinurl: -www site:domain").
+ Brute force subdomains from file, can also
+ perform recursion on subdomain that have NS records (all threaded).
+ Calculate C class domain network ranges
+ and perform whois queries on them (threaded).
+ Perform reverse lookups on netranges
+ ( C class or/and whois netranges) (threaded).
+ Write to domain_ips.txt file
+ ip-blocks.
+
+WWW:https://github.com/fwaeytens/dnsenum