diff --git a/src/libxt_TS3INIT_SET_COOKIE.c b/src/libxt_TS3INIT_SET_COOKIE.c index 66154ef..a1480ab 100644 --- a/src/libxt_TS3INIT_SET_COOKIE.c +++ b/src/libxt_TS3INIT_SET_COOKIE.c @@ -27,9 +27,10 @@ static void ts3init_set_cookie_tg_help(void) printf( "TS3INIT_SET_COOKIE target options:\n" " --zero-random-sequence Always return 0 as random sequence.\n" - " --seed Seed is a 60 byte lowercase hex number in.\n" + " --seed Seed is a %i byte lowercase hex number in.\n" " A source could be /dev/random.\n" - " --seed-file Read the seed from a file.\n"); + " --seed-file Read the seed from a file.\n", + COOKIE_SEED_LEN); } static const struct option ts3init_set_cookie_tg_opts[] = { diff --git a/src/libxt_ts3init_get_puzzle.c b/src/libxt_ts3init_get_puzzle.c index e2b2ca0..2fc3b48 100644 --- a/src/libxt_ts3init_get_puzzle.c +++ b/src/libxt_ts3init_get_puzzle.c @@ -29,9 +29,10 @@ static void ts3init_get_puzzle_help(void) "ts3init_get_puzzle match options:\n" " --min-client n The sending client needs to be at least version.\n" " --check-cookie Check that the cookie was generated by same seed.\n" - " --seed Seed is a 60 byte lowercase hex number in.\n" + " --seed Seed is a %i byte lowercase hex number in.\n" " A source could be /dev/random.\n" - " --seed-file Read the seed from a file.\n" + " --seed-file Read the seed from a file.\n", + COOKIE_SEED_LEN ); } diff --git a/src/ts3init_cookie_seed.h b/src/ts3init_cookie_seed.h index f4a39d1..bf1eae4 100644 --- a/src/ts3init_cookie_seed.h +++ b/src/ts3init_cookie_seed.h @@ -9,7 +9,7 @@ enum { static inline bool hex2int_seed(const char *src, __u8* dst) { int i, j; - for (i = 0; i < 60; ++i) + for (i = 0; i < COOKIE_SEED_LEN; ++i) { int v = 0; for ( j = 0; j < 2; ++j)