Force VNC protocol version downgrade

This commit is contained in:
David Maciejak 2019-09-05 12:28:45 +08:00 committed by GitHub
parent a06ee48826
commit 273334df88
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -110,7 +110,7 @@ int32_t start_vnc(int32_t s, char *ip, int32_t port, unsigned char options, char
}
break;
default:
hydra_report(stderr, "[ERROR] unknown VNC security type\n");
hydra_report(stderr, "[ERROR] unknown VNC security type 0x%x\n", buf2[3]);
hydra_child_exit(2);
}
@ -196,8 +196,8 @@ void service_vnc(char *ip, int32_t sp, unsigned char options, char *miscptr, FIL
}
if (verbose)
hydra_report(stderr, "[VERBOSE] Server banner is %s\n", buf);
if (((strstr(buf, "RFB 004.001") != NULL) || (strstr(buf, "RFB 003.007") != NULL) || (strstr(buf, "RFB 003.008") != NULL))) {
//using proto version 003.008 to talk to server 004.001 same for 3.7 and 3.8
if (((strstr(buf, "RFB 005.000") != NULL) || (strstr(buf, "RFB 004") != NULL) || (strstr(buf, "RFB 003.007") != NULL) || (strstr(buf, "RFB 003.008") != NULL))) {
//using proto version 003.007 to talk to server 005.xxx and 004.xxx same for 3.7 and 3.8
vnc_client_version = RFB37;
free(buf);
buf = strdup("RFB 003.007\n");