From 24fbaa6e82fa713ea1b7ee6d2e7a9b61016758fb Mon Sep 17 00:00:00 2001 From: Lucas Date: Sun, 14 Jun 2020 18:11:59 +0000 Subject: [PATCH] Default counter to current seconds since epoch --- cli.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/cli.c b/cli.c index ce44400..a606642 100644 --- a/cli.c +++ b/cli.c @@ -19,6 +19,7 @@ #include #include #include +#include #include #include "err.h" @@ -47,7 +48,7 @@ main(int argc, char *argv[]) int ch, digits, do_hotp; enum otp_hmac hmac; - counter = 0; + counter = (uint64_t)time(NULL); digits = 6; do_hotp = 0; hmac = OTP_HMAC_SHA1;