From 79610ed354d4b46b680590120aa8a505eae6177c Mon Sep 17 00:00:00 2001 From: Robert David Graham <robert_david_graham@yahoo.com> Date: Sun, 6 May 2018 18:00:42 -0400 Subject: [PATCH] config --- src/main-conf.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/main-conf.c b/src/main-conf.c index ba939ad..bc464b4 100644 --- a/src/main-conf.c +++ b/src/main-conf.c @@ -299,7 +299,9 @@ masscan_echo(struct Masscan *masscan, FILE *fp) fprintf(fp, "rate = %10.2f\n", masscan->max_rate); fprintf(fp, "randomize-hosts = true\n"); fprintf(fp, "seed = %" PRIu64 "\n", masscan->seed); - fprintf(fp, "shard = %u/%u\n", masscan->shard.one, masscan->shard.of); + + if (masscan->shard.one != 1 && masscan->shard.of != 1) + fprintf(fp, "shard = %u/%u\n", masscan->shard.one, masscan->shard.of); if (masscan->is_banners) fprintf(fp, "banners = true\n"); if (masscan->is_arp) @@ -986,6 +988,8 @@ config_top_ports(struct Masscan *masscan, unsigned n) } } +/*************************************************************************** + ***************************************************************************/ int isInteger(const char *value) { @@ -1000,6 +1004,10 @@ isInteger(const char *value) return 1; } +/*************************************************************************** + ***************************************************************************/ + + /*************************************************************************** * Called either from the "command-line" parser when it sees a --parm, * or from the "config-file" parser for normal options. -- GitLab