Revision a630f73282edd2be91966d6768312a6c7cff53c4 authored by Christophe Maudoux on 23 December 2018, 22:22:43 UTC, committed by Christophe Maudoux on 23 December 2018, 22:22:43 UTC
1 parent f0142fe
Raw File
totp-client.pl
#!/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;
back to top