Merge pull request #1004 from xh4vm/postgres-custom-port

feat: added the ability to brute force a custom port
This commit is contained in:
van Hauser 2025-03-11 18:06:53 +01:00 committed by GitHub
commit 7bf582699d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -41,7 +41,7 @@ int32_t start_postgres(int32_t s, char *ip, int32_t port, unsigned char options,
* Building the connection string
*/
snprintf(connection_string, sizeof(connection_string), "host = '%s' dbname = '%s' user = '%s' password = '%s' ", hydra_address2string(ip), database, login, pass);
snprintf(connection_string, sizeof(connection_string), "host = '%s' port = '%d' dbname = '%s' user = '%s' password = '%s' ", hydra_address2string(ip), port, database, login, pass);
if (verbose)
hydra_report(stderr, "connection string: %s\n", connection_string);