Sign in to follow this  
Keenan

Two-Factor Authentication

Recommended Posts

On 02/07/2017 at 1:48 PM, Keenan said:

@Baloo- I've actually had it on my list to search for a Linux alternative since you mentioned it before. The closest I've come are a few Chrome extensions, but I'm sure there's something else out there too. I'll comment with more information when I've had the time to look. :)

Thank you Keenan !

Share this post


Link to post
Share on other sites
On 03/07/2017 at 6:03 PM, bdew said:

 

 

Install python, make a script:

 


import hmac, base64, struct, hashlib, time

def get_hotp_token(secret, intervals_no):
    key = base64.b32decode(secret, True)
    msg = struct.pack(">Q", intervals_no)
    h = hmac.new(key, msg, hashlib.sha1).digest()
    o = ord(h[19]) & 15
    h = (struct.unpack(">I", h[o:o+4])[0] & 0x7fffffff) % 1000000
    return h

def get_totp_token(secret):
    return get_hotp_token(secret, intervals_no=int(time.time())//30)

print(get_totp_token("YOURSECRETHERE"))

 

 

Thanks Bdew, but that is a bit advanced for me. :P

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this