output 存在bug可能是未分配空间

This commit is contained in:
root 2018-04-03 07:37:41 -04:00
commit 2638b0e519

View file

@ -3513,10 +3513,7 @@ int main(int argc, char *argv[]) {
exit(-1); exit(-1);
} }
if (hydra_options.outfile_format == FORMAT_JSONV1) { if (hydra_options.outfile_format == FORMAT_JSONV1) {
sprintf(output,"%s", "{ \"generator\": {" //sprintf(output, "{\"test\":\"test\"}");
"\"software\": \"%s\", \"version\": \"%s\", \"built\": \"%s\","
"\"server\": \"%s\", \"service\": \"%s\", \"jsonoutputversion\": \"1.00\",\n"
"\"commandline\": \"%s");
fprintf(hydra_brains.ofp, "{ \"generator\": {\n" fprintf(hydra_brains.ofp, "{ \"generator\": {\n"
"\t\"software\": \"%s\", \"version\": \"%s\", \"built\": \"%s\",\n" "\t\"software\": \"%s\", \"version\": \"%s\", \"built\": \"%s\",\n"
"\t\"server\": \"%s\", \"service\": \"%s\", \"jsonoutputversion\": \"1.00\",\n" "\t\"server\": \"%s\", \"service\": \"%s\", \"jsonoutputversion\": \"1.00\",\n"
@ -4062,8 +4059,7 @@ int main(int argc, char *argv[]) {
} }
fclose(hydra_brains.ofp); fclose(hydra_brains.ofp);
} }
set("output", output); //set("output", output);
printf("%d", output);
redis_free(); redis_free();
fflush(NULL); fflush(NULL);
if (error || j != 0 || exit_condition < 0) if (error || j != 0 || exit_condition < 0)