mysql module not using a default db now

This commit is contained in:
van Hauser 2019-07-11 11:27:07 +02:00
parent 39bc8e64db
commit a93539e872
2 changed files with 3 additions and 8 deletions

View file

@ -3,6 +3,7 @@ Changelog for hydra
Release 9.1-dev
* your patch? :)
* changed mysql module not to use mysql db as a default. if the user has not access to this db auth fails ...
* added -K command line switch to disable redo attempts (good for mass scanning)
* forgot to have the -m option in the hydra help output

View file

@ -180,19 +180,13 @@ int32_t start_mysql(int32_t sock, char *ip, int32_t port, unsigned char options,
char *response = NULL, *login = NULL, *pass = NULL;
unsigned long response_len;
char res = 0;
char database[256];
char *database = NULL;
login = hydra_get_next_login();
pass = hydra_get_next_password();
if (miscptr)
strncpy(database, miscptr, sizeof(database) - 1);
else {
strncpy(database, DEFAULT_DB, sizeof(database) - 1);
if (verbose)
hydra_report(stderr, "[VERBOSE] using default db 'mysql'\n");
}
database[sizeof(database) - 1] = 0;
database = miscptr;
/* read server greeting */
res = hydra_mysql_init(sock);