From 30e7d8fd0fb0f3af047efb564b0a8ff0e809264f Mon Sep 17 00:00:00 2001 From: alfonzo1955 Date: Tue, 27 May 2014 14:58:46 -0400 Subject: [PATCH] Dirty, dirty hack to change source port everytime --- dnsblast.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/dnsblast.c b/dnsblast.c index a507016..aeae6df 100644 --- a/dnsblast.c +++ b/dnsblast.c @@ -351,15 +351,15 @@ main(int argc, char *argv[]) if (argc > 4) { port = argv[4]; } - if ((sock = get_sock(host, port, &ai)) == -1) { - perror("Oops"); - exit(EXIT_FAILURE); - } - init_context(&context, sock, ai, fuzz); - context.pps = pps; - srand(0U); - assert(send_count > 0UL); do { + if ((sock = get_sock(host, port, &ai)) == -1) { + perror("Oops"); + exit(EXIT_FAILURE); + } + init_context(&context, sock, ai, fuzz); + context.pps = pps; + srand(0U); + assert(send_count > 0UL); if (rand() > REPEATED_NAME_PROBABILITY) { get_random_name(name, sizeof name); }