mirror of
https://github.com/vanhauser-thc/thc-hydra.git
synced 2025-07-05 12:36:09 -07:00
http-get bugfix
This commit is contained in:
parent
758f7f9e0b
commit
eb1cd31030
2 changed files with 87 additions and 2 deletions
|
@ -161,6 +161,8 @@ int start_http(int s, char *ip, int port, unsigned char options, char *miscptr,
|
|||
if (tmpreplybuf[0] == 0 && strstr(http_buf, "HTTP/1.") != NULL) {
|
||||
strncpy(tmpreplybuf, http_buf, sizeof(tmpreplybuf) - 1);
|
||||
tmpreplybuf[sizeof(tmpreplybuf) - 1] = 0;
|
||||
free(http_buf);
|
||||
http_buf = hydra_receive_line(s);
|
||||
} else if (tmpreplybuf[0] != 0) {
|
||||
complete_line = 1;
|
||||
if ((tmpreplybufptr = malloc(strlen(tmpreplybuf) + strlen(http_buf) + 1)) != NULL) {
|
||||
|
@ -168,6 +170,7 @@ int start_http(int s, char *ip, int port, unsigned char options, char *miscptr,
|
|||
strcat(tmpreplybufptr, http_buf);
|
||||
free(http_buf);
|
||||
http_buf = tmpreplybufptr;
|
||||
if (debug) printf("http_buf now: %s\n", http_buf);
|
||||
}
|
||||
} else {
|
||||
free(http_buf);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue