linux安裝dirb

weixin_34185560發表於2018-03-26

首先去下載dirb安裝包

4052858-a1f39714fcf059a1.png
http://dirb.sourceforge.net/

4052858-8ced4a9af457d08f.png
dirb222.tar.gz

安裝過程

#解壓
root@linux:~/Download# tar -zxvf dirb222.tar.gz -C /opt/

#編譯
root@linux:/opt/dirb222# chmod +x configure
root@linux:/opt/dirb222# ./configure 
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking for libcurl >= 7.10.1... FAILED
configure: error: Curl-config was not found
#報錯,需要先安裝curl

#編譯安裝curl
#下載
root@linux:wget https://curl.haxx.se/download/curl-7.20.0.tar.bz2
#解壓
root@linux:tar -jxvf curl-7.20.0.tar.bz2  -C /opt/
#編譯、安裝
root@linux:/opt/curl-7.20.0# ./configure 
checking whether to enable maintainer-specific portions of Makefiles... no
checking whether to enable debug build options... no
checking whether to enable compiler optimizer... (assumed) yes
checking whether to enable strict compiler warnings... no
checking whether to enable curl debug memory tracking... no
checking whether to enable c-ares for DNS lookups... no
checking for sed... /usr/bin/sed
...
...
...

root@linux:/opt/curl-7.20.0# make
Making all in lib
make[1]: Entering directory `/opt/curl-7.20.0/lib'
make  all-am
make[2]: Entering directory `/opt/curl-7.20.0/lib'
if /bin/sh ../libtool --tag=CC --mode=compile gcc -DHAVE_CONFIG_H  -I../include/curl -I../include -I../include -I../lib -I../lib    -g0 -O2 -Wno-system-headers -MT file.lo -MD -MP -MF ".deps/file.Tpo" -c -o file.lo file.c; \
then mv -f ".deps/file.Tpo" ".deps/file.Plo"; else rm -f ".deps/file.Tpo"; exit 1; fi
libtool: compile:  gcc -DHAVE_CONFIG_H -I../include/
...
...
...

root@linux:/opt/curl-7.20.0# make install
Making install in lib
make[1]: Entering directory `/opt/curl-7.20.0/lib'
make[2]: Entering directory `/opt/curl-7.20.0/lib'
test -z "/usr/local/lib" || mkdir -p -- "/usr/local/lib"
 /bin/sh ../libtool --mode=install /usr/bin/install -c  'libcurl.la' '/usr/local/lib/libcurl.la'
libtool: install: /usr/bin/install -c .libs/libcurl.so.4.2.0 /usr/local/lib/libcurl.so.4.2.0
libtool: install: (cd /usr/local/lib && { ln -s -f libcurl.so.4.2.0 libcurl.so.4 || { rm -f libcurl.so.4 && ln -s libcurl.so.4.2.0 libcurl.so.4; }; })
libtool: install: (cd /usr/local/lib && { ln -s -f libcurl.so.4.2.0 libcurl.so || { rm -f libcurl.so && ln -s libcurl.so.4.2.0 libcurl.so; }; })
libtool: install: /usr/bin/install -c .libs/libcurl.lai /usr/local/lib/libcurl.la
libtool: install: /usr/bin/install -c .libs/libcurl.a /usr/local/lib/libcurl.a
libtool: install: chmod 644 /usr/local/lib/libcurl.a
libtool: install: ranlib /usr/local/lib/libcurl.a
libtool: finish: PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/root/bin:/sbin" ldconfig -n /usr/local/lib
----------------------------------------------------------------------
Libraries have been installed in:
...
...
...

#繼續編譯安裝dirb
root@izp76r8ej6pxg8z:/opt/dirb222# ./configure 
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking for libcurl >= 7.10.1... 7.20.0
checking for style of include used by make... GNU
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables... 
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking dependency style of gcc... gcc3
checking for curl_easy_init in -lcurl... yes
configure: creating ./config.status
config.status: creating Makefile
config.status: creating src/Makefile
config.status: creating gendict_src/Makefile
config.status: creating web2dic/Makefile
config.status: creating config.h
config.status: executing depfiles commands
                                     
 DIRB 2.22 build configuration.
                                     
 Now you must execute: "make"      
                                     
root@izp76r8ej6pxg8z:/opt/dirb222# make
make  all-recursive
make[1]: Entering directory `/opt/dirb222'
Making all in src
make[2]: Entering directory `/opt/dirb222/src'
if gcc -DHAVE_CONFIG_H -I. -I. -I.. -I/usr/local/include    -Wall  -g -O2 -MT crea_wordlist.o -MD -MP -MF ".deps/crea_wordlist.Tpo" -c -o crea_wordlist.o crea_wordlist.c; \
then mv -f ".deps/crea_wordlist.Tpo" ".deps/crea_wordlist.Po"; else rm -f ".deps/crea_wordlist.Tpo"; exit 1; fi
if gcc -DHAVE_CONFIG_H -I. -I. -I.. -I/usr/local/include    -Wall  -g -O2 -MT dirb.o -MD -MP -MF ".deps/dirb.Tpo" -c -o dirb.o dirb.c; \
then mv -f ".deps/dirb.Tpo" ".deps/dirb.Po"; else rm -f ".deps/dirb.Tpo"; exit 1; fi
if gcc -DHAVE_CONFIG_H -I. -I. -I.. -I/usr/local/include    -Wall  -g -O2 -MT get_url.o -MD -MP -MF ".deps/get_url.Tpo" -c -o get_url.o get_url.c; \
then mv -f ".deps/get_url.Tpo" ".deps/get_url.Po"; else rm -f ".deps/get_url.Tpo"; exit 1; fi
if gcc -DHAVE_CONFIG_H -I. -I. -I.. -I/usr/local/include    -Wall  -g -O2 -MT lanza_ataque.o -MD -MP -MF ".deps/lanza_ataque.Tpo" -c -o lanza_ataque.o lanza_ataque.c; \
then mv -f ".deps/lanza_ataque.Tpo" ".deps/lanza_ataque.Po"; else rm -f ".deps/lanza_ataque.Tpo"; exit 1; fi
In file included from lanza_ataque.c:9:0:
....
...
...
root@linux:/opt# cp -r /opt/dirb222/wordlists/ /usr/share/dirb/wordlists
#測試
root@linux:/opt# dirb http://www.baidu.com/
-----------------
DIRB v2.22    
By The Dark Raver
-----------------

START_TIME: Mon Mar 26 12:43:55 2018
URL_BASE: http://www.baidu.com/
WORDLIST_FILES: /usr/share/dirb/wordlists/common.txt

-----------------

GENERATED WORDS: 4612                                                          

---- Scanning URL: http://www.baidu.com/ ----
+ http://www.baidu.com/.hta (CODE:302|SIZE:231)

相關文章