Skip to content

Commit 0d87861

Browse files
elliotwutingfengdlenski
authored andcommitted
Update motp.py
1 parent 6cd85ad commit 0d87861

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

motp.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
import argparse, hashlib, time
1111

1212
p = argparse.ArgumentParser()
13-
p.add_argument('-s', '--seconds', default=30, type=int, help="Duration of mOTP codes in seconds (default %(default)s seconds)")
13+
p.add_argument('-s', '--seconds', default=10, type=int, help="Duration of mOTP codes in seconds (default %(default)s seconds)")
1414
p.add_argument('-l', '--length', default=6, type=int, help="Length of mOTP output (default %(default)s characters)")
1515
p.add_argument('-w', '--window', default=0, type=int, help="Number of counter values before and after current one to show (for testing time-skew)")
1616
p.add_argument('-v', '--verbose', action='count')
@@ -19,7 +19,7 @@
1919
args = p.parse_args()
2020

2121
epoch_time = int(time.time())
22-
counter = epoch_time // 10
22+
counter = epoch_time // int(args.seconds)
2323
secret = args.secret.strip().encode('ascii')
2424
pin = args.pin.strip().encode('ascii')
2525

0 commit comments

Comments
 (0)