mirror of
https://github.com/vanhauser-thc/thc-hydra.git
synced 2025-07-05 20:41:39 -07:00
fix for current libsvn
This commit is contained in:
parent
5a1a66d2a3
commit
4ee7bc3c38
2 changed files with 11 additions and 4 deletions
1
CHANGES
1
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
|
||||
|
|
14
hydra-svn.c
14
hydra-svn.c
|
@ -11,6 +11,8 @@
|
|||
#include <svn_pools.h>
|
||||
#include <svn_config.h>
|
||||
#include <svn_fs.h>
|
||||
#include <svn_path.h>
|
||||
|
||||
#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")) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue