Skip to content

Commit

Permalink
Merge pull request #57 from chris-pcguy/mysql-bandaid
Browse files Browse the repository at this point in the history
Band-aid for MySQL (Probably a part of #9)
  • Loading branch information
ithilgore authored Jun 2, 2019
2 parents d356ed9 + c7d0ef7 commit 2047c2c
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions modules/ncrack_mysql.cc
Original file line number Diff line number Diff line change
Expand Up @@ -251,6 +251,7 @@ mysql_loop_read(nsock_pool nsp, Connection *con, char *mysql_auth_method, char *
p++;
}
}
server_authentication_method[i] = '\0';
server_authentication_method[strlen(server_authentication_method) + 1] = '\0';
//printf("Server default authentication: %s\n", server_authentication_method);
strncpy(mysql_auth_method, server_authentication_method, strlen(server_authentication_method));
Expand Down Expand Up @@ -278,6 +279,7 @@ mysql_loop_read(nsock_pool nsp, Connection *con, char *mysql_auth_method, char *
for (i = 0; i < 21 ; i++){
server_authentication_method[i] = *p++;
}
server_authentication_method[i] = '\0';
server_authentication_method[strlen(server_authentication_method) + 1] = '\0';
strncpy(mysql_auth_method, server_authentication_method, strlen(server_authentication_method));

Expand Down

0 comments on commit 2047c2c

Please sign in to comment.