mirror of
https://github.com/vanhauser-thc/thc-hydra.git
synced 2025-07-05 12:36:09 -07:00
Merge pull request #970 from ccc-aaa/master
Fix compile errors when compiling against freerdp3
This commit is contained in:
commit
e4367b2f13
1 changed files with 17 additions and 11 deletions
28
hydra-rdp.c
28
hydra-rdp.c
|
@ -16,24 +16,30 @@ void dummy_rdp() { printf("\n"); }
|
|||
#else
|
||||
|
||||
#include <freerdp/freerdp.h>
|
||||
#include <freerdp/version.h>
|
||||
freerdp *instance = 0;
|
||||
BOOL rdp_connect(char *server, int32_t port, char *domain, char *login, char *password) {
|
||||
int32_t err = 0;
|
||||
|
||||
instance->settings->Username = login;
|
||||
instance->settings->Password = password;
|
||||
instance->settings->IgnoreCertificate = TRUE;
|
||||
rdpSettings* settings = instance->context->settings;
|
||||
|
||||
settings->Username = login;
|
||||
settings->Password = password;
|
||||
settings->IgnoreCertificate = TRUE;
|
||||
if (password[0] == 0)
|
||||
instance->settings->AuthenticationOnly = FALSE;
|
||||
settings->AuthenticationOnly = FALSE;
|
||||
else
|
||||
instance->settings->AuthenticationOnly = TRUE;
|
||||
instance->settings->ServerHostname = server;
|
||||
instance->settings->ServerPort = port;
|
||||
instance->settings->Domain = domain;
|
||||
instance->settings->MaxTimeInCheckLoop = 100;
|
||||
settings->AuthenticationOnly = TRUE;
|
||||
settings->ServerHostname = server;
|
||||
settings->ServerPort = port;
|
||||
settings->Domain = domain;
|
||||
|
||||
#if FREERDP_VERSION_MAJOR == 2
|
||||
settings->MaxTimeInCheckLoop = 100;
|
||||
#endif
|
||||
// freerdp timeout format is microseconds -> default:15000
|
||||
instance->settings->TcpConnectTimeout = hydra_options.waittime * 1000;
|
||||
instance->settings->TlsSecLevel = 0;
|
||||
settings->TcpConnectTimeout = hydra_options.waittime * 1000;
|
||||
settings->TlsSecLevel = 0;
|
||||
freerdp_connect(instance);
|
||||
err = freerdp_get_last_error(instance->context);
|
||||
return err;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue