diff --git a/ChangeLog b/ChangeLog index 5869c0c..75346ec 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +Version 1.79b: +-------------- + + - Improvement to directory listing detector. + Version 1.78b: -------------- diff --git a/Makefile b/Makefile index 37b23c4..6196ea3 100644 --- a/Makefile +++ b/Makefile @@ -20,7 +20,7 @@ # PROGNAME = skipfish -VERSION = 1.78b +VERSION = 1.79b OBJFILES = http_client.c database.c crawler.c analysis.c report.c INCFILES = alloc-inl.h string-inl.h debug.h types.h http_client.h \ diff --git a/analysis.c b/analysis.c index 20869fb..9a04056 100644 --- a/analysis.c +++ b/analysis.c @@ -1209,7 +1209,7 @@ static u8 is_javascript(struct http_response* res) { /* Illegal identifier, or too many whitespaces? Bail out. */ - if (!isalnum(*text) && (!strchr(" \t\r\n_.", *text) || + if (!isalnum(*text) && (!strchr(" \t\r\n_.$", *text) || (white_cnt++) > MAX_JS_WHITE)) { res->js_type = 1; return 0; diff --git a/crawler.c b/crawler.c index 83f0ce0..693c53d 100644 --- a/crawler.c +++ b/crawler.c @@ -651,7 +651,8 @@ static u8 inject_check1_callback(struct http_request* req, if (orig_state == PSTATE_CHILD_INJECT) { - if (!same_page(&MRES(0)->sig, &RPRES(req)->sig) && + if (MRES(0)->code < 300 && + !same_page(&MRES(0)->sig, &RPRES(req)->sig) && !same_page(&MRES(0)->sig, &MRES(1)->sig)) { problem(PROB_DIR_LIST, MREQ(0), MRES(0), (u8*)"unique response for /./", @@ -663,7 +664,8 @@ static u8 inject_check1_callback(struct http_request* req, RESP_CHECKS(RPREQ(req), MRES(0)); } - if (!same_page(&MRES(2)->sig, &RPRES(req)->sig) && + if (MRES(2)->code < 300 && + !same_page(&MRES(2)->sig, &RPRES(req)->sig) && !same_page(&MRES(2)->sig, &MRES(3)->sig)) { problem(PROB_DIR_LIST, MREQ(2), MRES(2), (u8*)"unique response for \\.\\",