Commit f43c03a2 authored by Raphaël Hertzog's avatar Raphaël Hertzog

Imported Upstream version 2.22

parent 46cf839b
File mode changed from 100755 to 100644
File mode changed from 100755 to 100644
File mode changed from 100755 to 100644
File mode changed from 100755 to 100644
File mode changed from 100755 to 100644
File mode changed from 100755 to 100644
File mode changed from 100755 to 100644
#! /bin/sh #! /bin/sh
# Guess values for system-dependent variables and create Makefiles. # Guess values for system-dependent variables and create Makefiles.
# Generated by GNU Autoconf 2.69 for dirb 2.21. # Generated by GNU Autoconf 2.69 for dirb 2.22.
# #
# Report bugs to <darkraver@open-labs.org>. # Report bugs to <darkraver@open-labs.org>.
# #
...@@ -579,8 +579,8 @@ MAKEFLAGS= ...@@ -579,8 +579,8 @@ MAKEFLAGS=
# Identity of this package. # Identity of this package.
PACKAGE_NAME='dirb' PACKAGE_NAME='dirb'
PACKAGE_TARNAME='dirb' PACKAGE_TARNAME='dirb'
PACKAGE_VERSION='2.21' PACKAGE_VERSION='2.22'
PACKAGE_STRING='dirb 2.21' PACKAGE_STRING='dirb 2.22'
PACKAGE_BUGREPORT='darkraver@open-labs.org' PACKAGE_BUGREPORT='darkraver@open-labs.org'
PACKAGE_URL='' PACKAGE_URL=''
...@@ -1217,7 +1217,7 @@ if test "$ac_init_help" = "long"; then ...@@ -1217,7 +1217,7 @@ if test "$ac_init_help" = "long"; then
# Omit some internal or obsolete options to make the list less imposing. # Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh. # This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF cat <<_ACEOF
\`configure' configures dirb 2.21 to adapt to many kinds of systems. \`configure' configures dirb 2.22 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]... Usage: $0 [OPTION]... [VAR=VALUE]...
...@@ -1283,7 +1283,7 @@ fi ...@@ -1283,7 +1283,7 @@ fi
if test -n "$ac_init_help"; then if test -n "$ac_init_help"; then
case $ac_init_help in case $ac_init_help in
short | recursive ) echo "Configuration of dirb 2.21:";; short | recursive ) echo "Configuration of dirb 2.22:";;
esac esac
cat <<\_ACEOF cat <<\_ACEOF
...@@ -1369,7 +1369,7 @@ fi ...@@ -1369,7 +1369,7 @@ fi
test -n "$ac_init_help" && exit $ac_status test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then if $ac_init_version; then
cat <<\_ACEOF cat <<\_ACEOF
dirb configure 2.21 dirb configure 2.22
generated by GNU Autoconf 2.69 generated by GNU Autoconf 2.69
Copyright (C) 2012 Free Software Foundation, Inc. Copyright (C) 2012 Free Software Foundation, Inc.
...@@ -1470,7 +1470,7 @@ cat >config.log <<_ACEOF ...@@ -1470,7 +1470,7 @@ cat >config.log <<_ACEOF
This file contains any messages produced by compilers while This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake. running configure, to aid debugging if configure makes a mistake.
It was created by dirb $as_me 2.21, which was It was created by dirb $as_me 2.22, which was
generated by GNU Autoconf 2.69. Invocation command line was generated by GNU Autoconf 2.69. Invocation command line was
$ $0 $@ $ $0 $@
...@@ -2137,7 +2137,7 @@ fi ...@@ -2137,7 +2137,7 @@ fi
# Define the identity of the package. # Define the identity of the package.
PACKAGE=dirb PACKAGE=dirb
VERSION=2.21 VERSION=2.22
cat >>confdefs.h <<_ACEOF cat >>confdefs.h <<_ACEOF
...@@ -3858,7 +3858,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 ...@@ -3858,7 +3858,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
# report actual input values of CONFIG_FILES etc. instead of their # report actual input values of CONFIG_FILES etc. instead of their
# values after options handling. # values after options handling.
ac_log=" ac_log="
This file was extended by dirb $as_me 2.21, which was This file was extended by dirb $as_me 2.22, which was
generated by GNU Autoconf 2.69. Invocation command line was generated by GNU Autoconf 2.69. Invocation command line was
CONFIG_FILES = $CONFIG_FILES CONFIG_FILES = $CONFIG_FILES
...@@ -3924,7 +3924,7 @@ _ACEOF ...@@ -3924,7 +3924,7 @@ _ACEOF
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
ac_cs_version="\\ ac_cs_version="\\
dirb config.status 2.21 dirb config.status 2.22
configured by $0, generated by GNU Autoconf 2.69, configured by $0, generated by GNU Autoconf 2.69,
with options \\"\$ac_cs_config\\" with options \\"\$ac_cs_config\\"
......
...@@ -2,7 +2,7 @@ dnl ++ Starting ...@@ -2,7 +2,7 @@ dnl ++ Starting
dnl +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ dnl +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
AC_PREREQ(2.50) AC_PREREQ(2.50)
AC_INIT(dirb,2.21,darkraver@open-labs.org) AC_INIT(dirb,2.22,darkraver@open-labs.org)
AC_CONFIG_SRCDIR(src/dirb.c) AC_CONFIG_SRCDIR(src/dirb.c)
AM_INIT_AUTOMAKE(AC_PACKAGE_NAME, AC_PACKAGE_VERSION) AM_INIT_AUTOMAKE(AC_PACKAGE_NAME, AC_PACKAGE_VERSION)
AM_CONFIG_HEADER(config.h) AM_CONFIG_HEADER(config.h)
......
File mode changed from 100755 to 100644
File mode changed from 100755 to 100644
DIRB CHANGELOG DIRB CHANGELOG
============== ==============
*2.2.1 (24/04/2013) *2.2.2 (05/04/2014)
------
- FEATURE: Añadida wordlist de Jersey
- FEATURE: Añadido mensaje de finalizacion 'END_TIME', contribucion de hyrumm
2.2.1 (24/04/2013)
------ ------
- FEATURE: Añadida hotkey 'r' que muestra las pruebas restantes - FEATURE: Añadida hotkey 'r' que muestra las pruebas restantes
......
File mode changed from 100755 to 100644
File mode changed from 100755 to 100644
File mode changed from 100755 to 100644
...@@ -3,6 +3,7 @@ DIRB TODO LIST ...@@ -3,6 +3,7 @@ DIRB TODO LIST
++ Alta prioridad: ++ Alta prioridad:
- Corregir permisos de ficheros y directorios
- Añadir funcion test_dir() - Añadir funcion test_dir()
++ Prioridad media: ++ Prioridad media:
......
File mode changed from 100755 to 100644
File mode changed from 100755 to 100644
File mode changed from 100755 to 100644
File mode changed from 100755 to 100644
File mode changed from 100755 to 100644
File mode changed from 100755 to 100644
File mode changed from 100755 to 100644
File mode changed from 100755 to 100644
File mode changed from 100755 to 100644
File mode changed from 100755 to 100644
...@@ -122,7 +122,6 @@ struct words *crea_wordlist_fich(char *fichero) { ...@@ -122,7 +122,6 @@ struct words *crea_wordlist_fich(char *fichero) {
char cbuffer[STRING_SIZE]; char cbuffer[STRING_SIZE];
struct words *ecurrent; struct words *ecurrent;
struct words *ebase; struct words *ebase;
struct words *efinal;
// Inicializamos // Inicializamos
...@@ -175,8 +174,6 @@ struct words *crea_wordlist_fich(char *fichero) { ...@@ -175,8 +174,6 @@ struct words *crea_wordlist_fich(char *fichero) {
ecurrent=ecurrent->siguiente; ecurrent=ecurrent->siguiente;
} }
efinal=ecurrent;
fclose(file); fclose(file);
return ebase; return ebase;
...@@ -194,7 +191,6 @@ struct words *crea_extslist(char *lista) { ...@@ -194,7 +191,6 @@ struct words *crea_extslist(char *lista) {
char cbuffer[STRING_SIZE]; char cbuffer[STRING_SIZE];
struct words *ecurrent; struct words *ecurrent;
struct words *ebase; struct words *ebase;
struct words *efinal;
char *apunt; char *apunt;
...@@ -239,8 +235,6 @@ struct words *crea_extslist(char *lista) { ...@@ -239,8 +235,6 @@ struct words *crea_extslist(char *lista) {
ecurrent=ecurrent->siguiente; ecurrent=ecurrent->siguiente;
} }
efinal=ecurrent;
return ebase; return ebase;
} }
......
...@@ -44,7 +44,6 @@ int main(int argc, char **argv) { ...@@ -44,7 +44,6 @@ int main(int argc, char **argv) {
curl=curl_easy_init(); curl=curl_easy_init();
// Recepcion de parametros // Recepcion de parametros
if(argc<2) { if(argc<2) {
...@@ -67,7 +66,6 @@ int main(int argc, char **argv) { ...@@ -67,7 +66,6 @@ int main(int argc, char **argv) {
optind+=2; optind+=2;
} }
while((c = getopt(argc,argv,"a:c:d:fgh:H:ilm:M:n:N:o:p:P:rRsSvwx:X:u:tz:"))!= -1){ while((c = getopt(argc,argv,"a:c:d:fgh:H:ilm:M:n:N:o:p:P:rRsSvwx:X:u:tz:"))!= -1){
switch(c) { switch(c) {
case 'a': case 'a':
...@@ -172,7 +170,6 @@ int main(int argc, char **argv) { ...@@ -172,7 +170,6 @@ int main(int argc, char **argv) {
} }
} }
// Limpia el input // Limpia el input
limpia_url(options.url_inicial); limpia_url(options.url_inicial);
...@@ -183,7 +180,6 @@ int main(int argc, char **argv) { ...@@ -183,7 +180,6 @@ int main(int argc, char **argv) {
limpia_url(options.mfile); limpia_url(options.mfile);
// Chequeos iniciales // Chequeos iniciales
get_options(); get_options();
...@@ -192,12 +188,10 @@ int main(int argc, char **argv) { ...@@ -192,12 +188,10 @@ int main(int argc, char **argv) {
IMPRIME("\n-----------------\n\n"); IMPRIME("\n-----------------\n\n");
// Creamos la lista de palabras // Creamos la lista de palabras
palabras=crea_wordlist(options.mfile); palabras=crea_wordlist(options.mfile);
// Abrimos el fichero de mutations y creamos la lista // Abrimos el fichero de mutations y creamos la lista
/* /*
...@@ -209,12 +203,10 @@ int main(int argc, char **argv) { ...@@ -209,12 +203,10 @@ int main(int argc, char **argv) {
} }
*/ */
// Lanzamos el bucle de descarga // Lanzamos el bucle de descarga
lanza_ataque(options.url_inicial, palabras); lanza_ataque(options.url_inicial, palabras);
// Finalizamos // Finalizamos
cierre(); cierre();
......
File mode changed from 100755 to 100644
File mode changed from 100755 to 100644
File mode changed from 100755 to 100644
...@@ -87,7 +87,7 @@ retry: ...@@ -87,7 +87,7 @@ retry:
if(options.verify_ssl==0) { if(options.verify_ssl==0) {
curl_easy_setopt(curl, CURLOPT_SSL_VERIFYPEER, 0); curl_easy_setopt(curl, CURLOPT_SSL_VERIFYPEER, 0);
curl_easy_setopt(curl, CURLOPT_SSL_VERIFYHOST, 0); curl_easy_setopt(curl, CURLOPT_SSL_VERIFYHOST, 0);
curl_easy_setopt(curl, CURLOPT_SSLVERSION, 3); //curl_easy_setopt(curl, CURLOPT_SSLVERSION, 3);
} }
......
File mode changed from 100755 to 100644
File mode changed from 100755 to 100644
File mode changed from 100755 to 100644
File mode changed from 100755 to 100644
...@@ -20,7 +20,6 @@ void get_options(void) { ...@@ -20,7 +20,6 @@ void get_options(void) {
tm = time(NULL); tm = time(NULL);
ptr = localtime(&tm); ptr = localtime(&tm);
// -o // -o
if(options.saveoutput==1) { if(options.saveoutput==1) {
...@@ -41,70 +40,60 @@ void get_options(void) { ...@@ -41,70 +40,60 @@ void get_options(void) {
IMPRIME("URL_BASE: %s\n", options.url_inicial); IMPRIME("URL_BASE: %s\n", options.url_inicial);
IMPRIME("WORDLIST_FILES: %s\n", options.mfile); IMPRIME("WORDLIST_FILES: %s\n", options.mfile);
// -a // -a
if(options.use_agent==1) { if(options.use_agent==1) {
IMPRIME("USER_AGENT: %s\n", options.agente); IMPRIME("USER_AGENT: %s\n", options.agente);
} }
// -c // -c
if(options.use_cookie==1) { if(options.use_cookie==1) {
IMPRIME("COOKIE: %s\n", options.cookie); IMPRIME("COOKIE: %s\n", options.cookie);
} }
// -d // -d
if(options.debuging) { if(options.debuging) {
IMPRIME("DEBUG_LEVEL: %d\n", options.debuging); IMPRIME("DEBUG_LEVEL: %d\n", options.debuging);
} }
// -f // -f
if(options.finetunning==1) { if(options.finetunning==1) {
IMPRIME("OPTION: Fine tunning of NOT_FOUND detection\n"); IMPRIME("OPTION: Fine tunning of NOT_FOUND detection\n");
} }
// -g // -g
if(options.save_found==1) { if(options.save_found==1) {
IMPRIME("OPTION: Saving Found URLs to disk\n"); IMPRIME("OPTION: Saving Found URLs to disk\n");
} }
// -h // -h
if(options.use_vhost==1) { if(options.use_vhost==1) {
IMPRIME("VHOST: %s\n", options.vhost); IMPRIME("VHOST: %s\n", options.vhost);
} }
// -H // -H
if(options.add_header) { if(options.add_header) {
IMPRIME("ADDED_HEADERS: \n--\n%s\n--\n", options.header_string); IMPRIME("ADDED_HEADERS: \n--\n%s\n--\n", options.header_string);
} }
// -i // -i
if(options.insensitive==1) { if(options.insensitive==1) {
IMPRIME("OPTION: Using Case-Insensitive Searches\n"); IMPRIME("OPTION: Using Case-Insensitive Searches\n");
} }
// -l // -l
if(options.print_location==1) { if(options.print_location==1) {
IMPRIME("OPTION: Printing LOCATION header\n"); IMPRIME("OPTION: Printing LOCATION header\n");
} }
// -m // -m
if(options.mutations_file==1) { if(options.mutations_file==1) {
...@@ -122,7 +111,6 @@ void get_options(void) { ...@@ -122,7 +111,6 @@ void get_options(void) {
IMPRIME("\n"); IMPRIME("\n");
} }
// -M // -M
if(options.mutations_list==1) { if(options.mutations_list==1) {
...@@ -140,84 +128,72 @@ void get_options(void) { ...@@ -140,84 +128,72 @@ void get_options(void) {
IMPRIME("\n"); IMPRIME("\n");
} }
// -N // -N
if(options.ignore_nec) { if(options.ignore_nec) {
IMPRIME("OPTION: Ignoring NOT_FOUND code -> %d\n", options.ignore_nec); IMPRIME("OPTION: Ignoring NOT_FOUND code -> %d\n", options.ignore_nec);
} }
// -p // -p
if(options.use_proxy==1) { if(options.use_proxy==1) {
IMPRIME("PROXY: %s\n", options.proxy); IMPRIME("PROXY: %s\n", options.proxy);
} }
// -P // -P
if(options.use_proxypass==1) { if(options.use_proxypass==1) {
IMPRIME("PROXY AUTHORIZATION: %s\n", options.proxypass_string); IMPRIME("PROXY AUTHORIZATION: %s\n", options.proxypass_string);
} }
// -r // -r
if(options.dont_recurse==1) { if(options.dont_recurse==1) {
IMPRIME("OPTION: Not Recursive\n"); IMPRIME("OPTION: Not Recursive\n");
} }
// -R // -R
if(options.interactive==1) { if(options.interactive==1) {
IMPRIME("OPTION: Interactive Recursion\n"); IMPRIME("OPTION: Interactive Recursion\n");
} }
// -s // -s
if(options.verify_ssl==1) { if(options.verify_ssl==1) {
IMPRIME("OPTION: Verifying SSL certificate\n"); IMPRIME("OPTION: Verifying SSL certificate\n");
} }
// -S // -S
if(options.silent_mode==1) { if(options.silent_mode==1) {
IMPRIME("OPTION: Silent Mode\n"); IMPRIME("OPTION: Silent Mode\n");
} }
// -t // -t
if(options.lasting_bar==0) { if(options.lasting_bar==0) {
IMPRIME("OPTION: NOT forcing an ending '/' on URLs\n"); IMPRIME("OPTION: NOT forcing an ending '/' on URLs\n");
} }
// -u // -u
if(options.use_pass==1) { if(options.use_pass==1) {
IMPRIME("AUTHORIZATION: %s\n", options.pass_string); IMPRIME("AUTHORIZATION: %s\n", options.pass_string);
} }
// -v // -v
if(options.nothide==1) { if(options.nothide==1) {
IMPRIME("OPTION: Show Not Existant Pages\n"); IMPRIME("OPTION: Show Not Existant Pages\n");
} }
// -w // -w
if(options.exitonwarn==0) { if(options.exitonwarn==0) {
IMPRIME("OPTION: Not Stoping on warning messages\n"); IMPRIME("OPTION: Not Stoping on warning messages\n");
} }
// -x // -x
if(options.extensions_file==1) { if(options.extensions_file==1) {
...@@ -237,7 +213,6 @@ void get_options(void) { ...@@ -237,7 +213,6 @@ void get_options(void) {
IMPRIME(" [NUM = %d]\n", exts_num); IMPRIME(" [NUM = %d]\n", exts_num);
} }
// -X // -X
if(options.extensions_list==1) { if(options.extensions_list==1) {
...@@ -257,7 +232,6 @@ void get_options(void) { ...@@ -257,7 +232,6 @@ void get_options(void) {
IMPRIME(" [NUM = %d]\n", exts_num); IMPRIME(" [NUM = %d]\n", exts_num);
} }
// -z // -z
if(options.speed) { if(options.speed) {
......
...@@ -158,6 +158,9 @@ void resume(void) { ...@@ -158,6 +158,9 @@ void resume(void) {
wordlist_final=wordlist_current; wordlist_final=wordlist_current;
wordlist_current=wordlist_base; wordlist_current=wordlist_base;
while(wordlist_current->siguiente!=0 && strncmp(wordlist_current->word, options.current_word, STRING_SIZE-1)!=0) { wordlist_current=wordlist_current->siguiente; } while(wordlist_current->siguiente!=0 && strncmp(wordlist_current->word, options.current_word, STRING_SIZE-1)!=0) { wordlist_current=wordlist_current->siguiente; }
// Avanzamos la wordlist en 1
wordlist_current=wordlist_current->siguiente;
// Relanzamos el scan // Relanzamos el scan
......
...@@ -301,10 +301,16 @@ char kbhit(void){ ...@@ -301,10 +301,16 @@ char kbhit(void){
*/ */
void cierre(void) { void cierre(void) {
struct tm *ptr;
time_t tm;
tm = time(NULL);
ptr = localtime(&tm);
if(!options.silent_mode) printf(" \r"); if(!options.silent_mode) printf(" \r");
IMPRIME("\n-----------------\n"); IMPRIME("\n-----------------\n");
IMPRIME("END_TIME: %s", asctime(ptr));
IMPRIME("DOWNLOADED: %d - FOUND: %d\n", descargadas, encontradas); IMPRIME("DOWNLOADED: %d - FOUND: %d\n", descargadas, encontradas);
if(options.saveoutput) fclose(outfile); if(options.saveoutput) fclose(outfile);
......
File mode changed from 100755 to 100644
File mode changed from 100755 to 100644
File mode changed from 100755 to 100644
File mode changed from 100755 to 100644
File mode changed from 100755 to 100644
File mode changed from 100755 to 100644
File mode changed from 100755 to 100644
File mode changed from 100755 to 100644
File mode changed from 100755 to 100644
File mode changed from 100755 to 100644
File mode changed from 100755 to 100644
File mode changed from 100755 to 100644
File mode changed from 100755 to 100644
File mode changed from 100755 to 100644
File mode changed from 100755 to 100644
This diff is collapsed.
File mode changed from 100755 to 100644