LemonLDAP::NG Web SSO
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
lemonldap-ng/scripts/totp-client.pl

16 lines
269 B

#!/usr/bin/perl -w
use Authen::OATH;
use Convert::Base32 qw( decode_base32 );
unless ( $ARGV[0] ) {
print STDERR "Usage $0 <totp-secret>\n";
exit 1;
}
my $oath = Authen::OATH->new();
my $totp = $oath->totp( decode_base32( $ARGV[0] ) );
print "$totp\n";
1;