diff --git a/CHANGES b/CHANGES index 33247a5..4435e92 100644 --- a/CHANGES +++ b/CHANGES @@ -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 diff --git a/hydra-mysql.c b/hydra-mysql.c index 0fda989..c33dc88 100644 --- a/hydra-mysql.c +++ b/hydra-mysql.c @@ -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);