mirror of
https://github.com/vanhauser-thc/thc-hydra.git
synced 2025-07-05 12:36:09 -07:00
fix typo and the offset value of miscptr
This commit is contained in:
parent
0a0dd605ff
commit
c3c23bbd94
1 changed files with 15 additions and 4 deletions
|
@ -402,14 +402,25 @@ int32_t parse_options(char *miscptr, ptr_header_node *ptr_head) {
|
|||
case 'a': // fall through
|
||||
case 'A': // only for http, not http-form!
|
||||
ptr = miscptr + 2;
|
||||
if (strncasecmp(miscptr, "NTML", 4) == 0)
|
||||
|
||||
if (strncasecmp(ptr, "NTLM", 4) == 0)
|
||||
http_auth_mechanism = AUTH_NTLM;
|
||||
else if (strncasecmp(miscptr, "MD5", 3) == 0 || strncasecmp(miscptr, "DIGEST", 6) == 0)
|
||||
else if (strncasecmp(ptr, "MD5", 3) == 0 || strncasecmp(ptr, "DIGEST", 6) == 0)
|
||||
http_auth_mechanism = AUTH_DIGESTMD5;
|
||||
else if (strncasecmp(miscptr, "BASIC", 4) == 0)
|
||||
else if (strncasecmp(ptr, "BASIC", 4) == 0)
|
||||
http_auth_mechanism = AUTH_BASIC;
|
||||
else
|
||||
fprintf(stderr, "[WARNING] unknown http auth type: %s\n", miscptr);
|
||||
fprintf(stderr, "[WARNING] unknown http auth type: %s\n", ptr);
|
||||
|
||||
while (*ptr != 0 && *ptr != ':')
|
||||
ptr++;
|
||||
|
||||
if (*ptr != 0) {
|
||||
*ptr = 0;
|
||||
ptr += 1;
|
||||
}
|
||||
|
||||
miscptr = ptr;
|
||||
break;
|
||||
case 'c': // fall through
|
||||
case 'C':
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue