Skip to content

Commit 7f1a78e

Browse files
author
Ian Gallagher
committed
Initial commit from namedrop-0.2.4.tar.gz
0 parents  commit 7f1a78e

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

66 files changed

+12206
-0
lines changed

Changelog

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
0.0.5
2+
3+
0.1.0
4+
add glibc adns (getaddrinfo_a) support
5+
6+
0.2.0
7+
change glibc adns to gnu-adns to c-ares async dns
8+
9+
0.2.1
10+
tidy up all features to a semi-working state
11+
make uninstall safer
12+
clean up makefile for destdir support, etc.
13+
14+
0.2.2
15+
autoconfify, attempt to guess about portability in some limited sense
16+
attempt to make discovery mode work
17+
18+
0.2.3
19+
document and pack for release

LICENSE

Lines changed: 343 additions & 0 deletions
Large diffs are not rendered by default.

Makefile.in

Lines changed: 95 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,95 @@
1+
include Makefile.inc
2+
3+
.c.o:
4+
$(CC) $(CFLAGS) -c -o $@ $<
5+
6+
all: $(PROGNAME) default.conf docsd
7+
8+
wrap: myadns
9+
10+
SRCS=getopts.c readconf.c ext/cidr.c ext/fread.c ext/xmalloc.c ext/hash.c @EXTRA_SRCS@ ext/standard_dns.c main.c misc.c ext/chtbl.c
11+
12+
HDRS=$(SRCS:.c=.h) settings.h
13+
OBJS=$(SRCS:.c=.o)
14+
15+
$(OBJS): $(HDRS) Makefile
16+
17+
WORDLISTS=dict_words.gz dos.gz etc-hosts.gz fast.gz jargon.gz mit.edu.gz movie-characters.gz names.gz oz.gz
18+
DEFWL=fast.gz
19+
20+
docsd:
21+
$(USE_MAKE) -C docs
22+
23+
$(PROGNAME): $(HDRS) Makefile $(OBJS)
24+
echo $(OBJS)
25+
$(CC) $(CFLAGS) $(LDFLAGS) -o $(PROGNAME) $(OBJS) $(LIBS)
26+
27+
default.conf: default.conf.in
28+
cat default.conf.in | sed -e 's,@SHAREDIR@,'"$(SHAREDIR)"',g' -e 's,@PROGNAME@,'"$(PROGNAME)"',g' -e 's,@SYSCONFDIR@,'"$(SYSCONFDIR)"',g' > default.conf
29+
30+
install: all
31+
mkdir -p $(DESTDIR)/$(BINDIR)
32+
$(INSTALL) -m755 $(PROGNAME) $(DESTDIR)/$(BINDIR)
33+
mkdir -p $(DESTDIR)/$(MAN1DIR)
34+
$(INSTALL) -m644 docs/man.1 $(DESTDIR)/$(MAN1DIR)/$(PROGNAME).$(MANSUF)
35+
$(MKDIR) $(DESTDIR)/$(SYSCONFDIR)
36+
if test -f $(DESTDIR)/$(SYSCONFDIR)/$(PROGNAME).conf; then \
37+
$(INSTALL) -m644 default.conf $(DESTDIR)/$(SYSCONFDIR)/$(PROGNAME).conf.new; \
38+
else\
39+
$(INSTALL) -m644 default.conf $(DESTDIR)/$(SYSCONFDIR)/$(PROGNAME).conf;\
40+
fi
41+
$(MKDIR) $(DESTDIR)/$(SHAREDIR)
42+
( cd wordlists && \
43+
for g in $(WORDLISTS); do \
44+
$(INSTALL) -m644 $$g $(DESTDIR)/$(SHAREDIR)/; \
45+
done \
46+
)
47+
( cd $(DESTDIR)/$(SHAREDIR) && rm -f default.gz && $(LN) $(DEFWL) default.gz )
48+
49+
myadns: myadns.c ext/xmalloc.o misc.o
50+
$(CC) $(CFLAGS) -D_WRAP_ -c myadns.c
51+
$(CC) $(CFLAGS) -o myadns ext/xmalloc.o myadns.o misc.o $(LIBS)
52+
rm -f myadns.o
53+
54+
ext/hash: ext/hash.c
55+
$(CC) $(CFLAGS) -D_WRAP_ -o ext/hash ext/hash.c
56+
57+
debug: clean
58+
(cd ext && rm xmalloc.[ch] && ln -s _xdebug.c xmalloc.c && ln -s _xdebug.h xmalloc.h )
59+
60+
nodebug: clean
61+
(cd ext && rm xmalloc.[ch] && ln -s _xmalloc.c xmalloc.c && ln -s _xmalloc.h xmalloc.h )
62+
63+
uninstall:
64+
-rm -f $(BINDIR)/$(PROGNAME)
65+
-if test -d $(MAN1DIR); then \
66+
rm -f $(MAN1DIR)/$(PROGNAME).$(MANSUF); \
67+
fi
68+
-if test -d $(SHAREDIR); then \
69+
( cd $(SHAREDIR) && rm -f $(WORDLISTS) ); \
70+
rmdir $(SHAREDIR); \
71+
fi
72+
-if test -d $(SYSCONFDIR); then \
73+
rm -f $(SYSCONFDIR)/$(PROGNAME).conf; \
74+
rmdir $(SYSCONFDIR); \
75+
fi
76+
77+
tags:
78+
cscope -Rqb
79+
80+
clean:
81+
rm -rf core $(OBJS) $(PROGNAME) cscope.* gmon.out myadns ext/hash default.conf
82+
$(USE_MAKE) -C docs clean
83+
84+
slack:
85+
./scripts/mkslackpkg
86+
87+
check: all
88+
./scripts/runtests.sh
89+
90+
distclean: clean
91+
rm -rf configure Makefile.inc config.log config.status autom4te.cache config.h packages stage
92+
$(USE_MAKE) -C docs distclean
93+
94+
dist: distclean
95+
./scripts/mkdist.sh

Makefile.inc.in

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
# user configurable options below
2+
3+
# if you dont have c-ares then change CARES to 0, no async requests will not be available
4+
HAVE_C_ARES=@HAVE_C_ARES@
5+
6+
USE_MAKE=@USE_MAKE@
7+
8+
prefix=@prefix@
9+
exec_prefix=@exec_prefix@
10+
11+
# end of user configurable options
12+
13+
# other options you may need to change below.
14+
15+
# this should be gcc for gnu type platforms, or cc if that doesnt work generally
16+
CC=@CC@
17+
18+
CCINCS=-I. -I/usr/local/include
19+
CCDEFS=@DEFS@ -DHAVE_C_ARES=@HAVE_C_ARES@ -DBIGENDIAN=@BIGENDIAN@
20+
CCOPTS=@CFLAGS@
21+
CCWARNS=-Wall -Wshadow -Wcast-align -Wcast-qual -Wchar-subscripts -Wno-deprecated-declarations -Wformat-security -Wimplicit -Wsign-compare -Wuninitialized -Wunused -Wwrite-strings -Wmissing-format-attribute -Wmissing-noreturn -Wmissing-braces -Wparentheses -Wsequence-point -Wno-format-y2k -DSTRICT #-Werror
22+
CCWARNS=-Wall
23+
24+
LDFLAGS=-L/usr/local/lib
25+
LIBS=-lz @LIBS@ @EXTRA_LIBS@
26+
27+
INSTALL=install -o root
28+
MKDIR=mkdir -p -m 755
29+
30+
LN=@LN_S@
31+
32+
MANSUF=1
33+
DESTDIR ?=
34+
35+
PROGNAME=@PACKAGE_NAME@
36+
37+
SYSCONFDIR=@sysconfdir@/$(PROGNAME)
38+
SHAREDIR=@datadir@/$(PROGNAME)
39+
BINDIR=@bindir@
40+
MAN1DIR=@mandir@/man1
41+
42+
CFLAGS += $(CCWARNS) $(CCINCS) $(CCDEFS) $(CCOPTS) -DSYSCONFDIR=\"$(SYSCONFDIR)\" -DSHAREDIR=\"$(SHAREDIR)\" -DPROGNAME=\"$(PROGNAME)\"

OS_STATUS

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
Linux/Slackware 10.2/ia32 X
2+
Linux/Slackware 10.2/x86_64 X
3+
FreeBSD 6.0-RELEASE/ia32 X (Slow in sync mode)
4+
NetBSD 2.1 (GENERIC)/ia32 X
5+
OSX/Darwin 7.9.0/ppc X
6+
7+
8+
X - Full Pass
9+
x - Build OK/Most checks passed

README

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
Building/Configuring/Whatever:
2+
3+
SEE OS_STATUS FOR INFORMATION ABOUT YOUR SPECIFIC SYSTEM AND THIS SOFTWARE
4+
5+
a) get and install c-ares ( http://daniel.haxx.se/projects/c-ares/ ) if at all possible
6+
b) run ./configure --with-your-arguments
7+
1) you may need to run configure like:
8+
LDFLAGS="-L/usr/local/lib" CFLAGS="-I/usr/local/include" ./configure
9+
if you are running certain os'es that dont search /usr/local by default and have
10+
installed c-ares into /usr/local
11+
c) type make
12+
d) type make install
13+
e) goto http://www.dyadsecurity.com/s_softwarefeedback.html and please fill it in so we
14+
can make better software in the future.
15+
16+
DESTDIR is supported for making packages, make uninstall also works to remove the software
17+
from your system. please note that the default config file is preserved, so if you make install
18+
twice, you will not overwrite your already present configuration file, if you uninstall this
19+
software you will need to manually remove the configuration file(s) (sysconfdir)/(progname)/(progname).conf.new
20+
21+
basic usage:
22+
23+
### wordlist based A (forward) record brute force:
24+
25+
namedrop -ve domain.tld
26+
27+
### wordlist (possibly $PREFIX/share/namedrop/oz or $PREFIX/share/namedrop/os.gz) based A record brute force:
28+
namedrop -ve -f oz domain.tld
29+
30+
### wordlist specifically with /usr/share/dict/words based A record brute force:
31+
namedrop -ve -f /usr/share/dict/words domain.tld
32+
33+
### to enable SQL output (for the same as above):
34+
(the schema you want is located inside sql/ )
35+
36+
namedrop -ves domain.tld
37+
38+
the direction flag in the SQL output means:
39+
0: Reverse Lookup
40+
1: Forward Lookup
41+
42+
### to Brute force hostnames from 2 to 4 characters: (db.domain.tld -> www2.domain.tld)
43+
44+
namedrop -ve -b2-4 domain.tld
45+
46+
### reverse dns based sweep of a cidr range:
47+
48+
namedrop -v -r www.google.com/24
49+
50+
### reverse dns scanning a ipv6 range:
51+
52+
namedrop -v -6r 6bone.net/114
53+
54+
see man page for further usage

TODO

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
finish discovery mode
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
libs/c-ares

0 commit comments

Comments
 (0)