Revision 27aea3ecd2da1710577a126cdb69a6a67c2fd6b2 authored by Xavier Guimard on 21 August 2018, 19:03:04 UTC, committed by Xavier Guimard on 21 August 2018, 19:03:04 UTC
1 parent a40f9a3
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