From d7d4e8c338f50c9e5980b668d5112a642542c96e Mon Sep 17 00:00:00 2001 From: Herman Duarte Date: Tue, 29 Mar 2016 12:50:41 +0100 Subject: [PATCH] Fixed json output --- src/out-json.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/out-json.c b/src/out-json.c index 74d56904..ecc12c2a 100644 --- a/src/out-json.c +++ b/src/out-json.c @@ -12,6 +12,7 @@ json_out_open(struct Output *out, FILE *fp) { UNUSEDPARM(out); UNUSEDPARM(fp); + fprintf(fp, "["); } @@ -21,7 +22,7 @@ static void json_out_close(struct Output *out, FILE *fp) { UNUSEDPARM(out); - fprintf(fp, "{finished: 1}\n"); + fprintf(fp, "{\"finished\": 1}]\n"); } //{ ip: "124.53.139.201", ports: [ {port: 443, proto: "tcp", status: "open", reason: "syn-ack", ttl: 48} ] }