mirror of
https://github.com/vanhauser-thc/thc-hydra.git
synced 2025-07-05 20:41:39 -07:00
added dbclose() and dbexit() in mssql module
This commit is contained in:
parent
369374b166
commit
bc48f7625b
1 changed files with 7 additions and 0 deletions
|
@ -19,7 +19,9 @@ int32_t start_mssql(int32_t s, char *ip, int32_t port, unsigned char options, ch
|
||||||
LOGINREC *attempt;
|
LOGINREC *attempt;
|
||||||
|
|
||||||
dbinit();
|
dbinit();
|
||||||
|
|
||||||
attempt = dblogin();
|
attempt = dblogin();
|
||||||
|
|
||||||
DBSETLUSER(attempt, login);
|
DBSETLUSER(attempt, login);
|
||||||
DBSETLPWD(attempt, pass);
|
DBSETLPWD(attempt, pass);
|
||||||
|
|
||||||
|
@ -27,6 +29,8 @@ int32_t start_mssql(int32_t s, char *ip, int32_t port, unsigned char options, ch
|
||||||
dbproc = dbopen(attempt, ipaddr_str);
|
dbproc = dbopen(attempt, ipaddr_str);
|
||||||
|
|
||||||
if (dbproc != NULL) {
|
if (dbproc != NULL) {
|
||||||
|
dbclose(dbproc);
|
||||||
|
dbexit();
|
||||||
hydra_report_found_host(port, ip, "mssql", fp);
|
hydra_report_found_host(port, ip, "mssql", fp);
|
||||||
hydra_completed_pair_found();
|
hydra_completed_pair_found();
|
||||||
if (memcmp(hydra_get_next_pair(), &HYDRA_EXIT, sizeof(HYDRA_EXIT)) == 0)
|
if (memcmp(hydra_get_next_pair(), &HYDRA_EXIT, sizeof(HYDRA_EXIT)) == 0)
|
||||||
|
@ -35,12 +39,15 @@ int32_t start_mssql(int32_t s, char *ip, int32_t port, unsigned char options, ch
|
||||||
}
|
}
|
||||||
|
|
||||||
hydra_completed_pair();
|
hydra_completed_pair();
|
||||||
|
dbclose(dbproc);
|
||||||
|
dbexit();
|
||||||
if (memcmp(hydra_get_next_pair(), &HYDRA_EXIT, sizeof(HYDRA_EXIT)) == 0)
|
if (memcmp(hydra_get_next_pair(), &HYDRA_EXIT, sizeof(HYDRA_EXIT)) == 0)
|
||||||
return 2;
|
return 2;
|
||||||
|
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
|
|
||||||
#define MSLEN 30
|
#define MSLEN 30
|
||||||
|
|
||||||
unsigned char p_hdr[] = "\x02\x00\x02\x00\x00\x00\x02\x00\x00\x00"
|
unsigned char p_hdr[] = "\x02\x00\x02\x00\x00\x00\x02\x00\x00\x00"
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue