----One Time Password in Python----

Programmerix team has created their own version of OTP generation with the help of random module in python.You can check it and running the code on your system.Our team is well versed with all programming languages and technologies.We simply believe in quality and knowledge sharing among learners.Code is available downside....Hope you like it--
----PROGRAM---- 
import random 
import commands
#------------------program Of OTP generation------------------------------------
mail=raw_input('MailId/MonileNumber :')
passd=raw_input('enter the password :')
list=[1111,1212,1313,4178,2345,7878,1234,9876,7865,4567,8974,1276,7687,8778,2222,0104,8483]
otp=random.choice(list)
print 'OTP is genrated ',otp
user=int(raw_input('Enter the OTP  :'))
flag = 1
while flag == 1:
    if otp == user:
            print 'Successfull LOGIN'
            flag = 0
            break
    else :
            print 'OTP is wrong@@@-- Press O or o for ReSending OTP'
            choice=str(raw_input())
            flag=1
    if choice == 'o'or choice == 'O':
            otp = random.choice(list)
            print 'new Genrated OTP is ',otp
            user = int(raw_input('Enter the OTP again :'))
raw_input("Enter any key for Exit")

Comments

Popular posts from this blog

Network File System

Fibonacci Series with Python