diff --git a/CHANGES b/CHANGES index d6a0247..6731174 100644 --- a/CHANGES +++ b/CHANGES @@ -10,6 +10,7 @@ Release 8.4-dev * New command line options: -y : disables -x 1aA interpretation, thanks to crondaemon for the patch -I : ignore an existing hydra.restore file (dont wait for 10 seconds) +* Upgraded hydra-svn to work with the current libsvn version * Fixed dpl4hydra to be able to update from the web again * Updated default password lists * The protocols vnc, xmpp, telnet, imap, nntp and pcanywhere got accidentially long sleep commands due a patch in 8.2, fixed diff --git a/hydra-svn.c b/hydra-svn.c index 8a15742..ec1efae 100644 --- a/hydra-svn.c +++ b/hydra-svn.c @@ -11,6 +11,8 @@ #include #include #include +#include + #endif #include "hydra-mod.h" @@ -52,6 +54,7 @@ int start_svn(int s, char *ip, int port, unsigned char options, char *miscptr, F int ipv6 = 0; char URL[1024]; char URLBRANCH[256]; + const char *canonical; apr_pool_t *pool; svn_error_t *err; svn_opt_revision_t revision; @@ -79,7 +82,8 @@ int start_svn(int s, char *ip, int port, unsigned char options, char *miscptr, F return 4; } - if ((err = svn_client_create_context(&ctx, pool))) { + //if ((err = svn_client_create_context(&ctx, pool))) { + if ((err = svn_client_create_context2(&ctx, NULL, pool))) { svn_handle_error2(err, stderr, FALSE, "hydra: "); return 4; } @@ -104,17 +108,19 @@ int start_svn(int s, char *ip, int port, unsigned char options, char *miscptr, F else snprintf(URL, sizeof(URL), "svn://%s:%d/%s", hydra_address2string(ip), port, URLBRANCH); dirents = SVN_DIRENT_KIND; - err = svn_client_list2(URL, &revision, &revision, svn_depth_unknown, dirents, FALSE, print_dirdummy, NULL, ctx, pool); + canonical = svn_uri_canonicalize(URL, pool); + //err = svn_client_list2(canonical, &revision, &revision, svn_depth_unknown, dirents, FALSE, print_dirdummy, NULL, ctx, pool); + err = svn_client_list3(canonical, &revision, &revision, svn_depth_unknown, dirents, FALSE, FALSE, (svn_client_list_func2_t) print_dirdummy, NULL, ctx, pool); svn_pool_clear(pool); svn_pool_destroy(pool); if (err) { - if (verbose) + if (debug || (verbose && (err->apr_err != 170001 && err->apr_err != 170013))) hydra_report(stderr, "[ERROR] Access refused (error code %d) , message: %s\n", err->apr_err, err->message); //Username not found 170001 ": Username not found" //Password incorrect 170001 ": Password incorrect" - if (err->apr_err != 170001) { + if (err->apr_err != 170001 && err->apr_err != 170013) { return 4; //error } else { if (strstr(err->message, "Username not found")) {