Skip to content
This repository has been archived by the owner on Nov 30, 2024. It is now read-only.

Commit

Permalink
Now time of life code is visible
Browse files Browse the repository at this point in the history
  • Loading branch information
AginSquash committed Oct 30, 2019
1 parent 9e25fe8 commit b757fbf
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions CodesEditor.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,13 @@
import FileWork as fw

### My fucntions here starts
def getTime():
time_last = int(time.strftime("%S"))
if time_last>=30:
time_last = time_last - 30
time_last = 30 - time_last
return ("(You have %s seconds left) " % str(time_last))

def help():
teer()
print("1 - add\n2 - del\n3 - change\n4 - get\n\n9 - exit")
Expand Down Expand Up @@ -62,6 +69,7 @@ def get(codes):
if service_name in codes:
secure_code = codes[service_name]
totp = pyotp.TOTP(secure_code)
print( getTime() )
print(service_name + ": " + totp.now())
teer()

Expand Down

0 comments on commit b757fbf

Please sign in to comment.