mirror of
https://github.com/vanhauser-thc/thc-hydra.git
synced 2025-08-20 13:23:57 -07:00
Fix typo in error msg creation
Prevent typo while generating such kind of logs: "[ERROR] 0 targets did not complete" "1 of 1 target completed, 0 valid passwords found"
This commit is contained in:
parent
7009b6db03
commit
6a758105bb
1 changed files with 2 additions and 2 deletions
4
hydra.c
4
hydra.c
|
@ -4033,7 +4033,7 @@ int main(int argc, char *argv[]) {
|
||||||
printf("%d of %d target%s%scompleted, %lu valid password",
|
printf("%d of %d target%s%scompleted, %lu valid password",
|
||||||
hydra_brains.targets - j - k - error, hydra_brains.targets, hydra_brains.targets == 1 ? " " : "s ",
|
hydra_brains.targets - j - k - error, hydra_brains.targets, hydra_brains.targets == 1 ? " " : "s ",
|
||||||
hydra_brains.found > 0 ? "successfully " : "", hydra_brains.found);
|
hydra_brains.found > 0 ? "successfully " : "", hydra_brains.found);
|
||||||
printf("%s", hydra_brains.found == 1 ? "" : "s");
|
printf("%s", hydra_brains.found < 1 ? "" : "s");
|
||||||
printf(" found\n");
|
printf(" found\n");
|
||||||
|
|
||||||
error += j;
|
error += j;
|
||||||
|
@ -4090,7 +4090,7 @@ int main(int argc, char *argv[]) {
|
||||||
error = 1;
|
error = 1;
|
||||||
}
|
}
|
||||||
if (error) {
|
if (error) {
|
||||||
snprintf(tmp_str, STRMAX, "[ERROR] %d target%s did not complete", j, j == 1 ? "" : "s");
|
snprintf(tmp_str, STRMAX, "[ERROR] %d target%s did not complete", j, j < 1 ? "" : "s");
|
||||||
fprintf(stderr, "%s\n", tmp_str);
|
fprintf(stderr, "%s\n", tmp_str);
|
||||||
if (*json_error) {
|
if (*json_error) {
|
||||||
strncat(json_error,", ", STRMAX);
|
strncat(json_error,", ", STRMAX);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue