my darkc0der friend question
I got it working perfectly. Included the 2 trials method and blocking of Account after:)
Now the only problem am having is when putting the pin.
input = int(raw_input(“Enter ur 4-digit PIN : “))
If a char is entered, it brings up a compiler error. I want it to bring out my error like
print ‘Ure to enter an int ONLY’
Anoda thn, is there a way i can limit the input value? Like its meant to be 4-digit. Anyhelp with ‘len’. That makes it possible for only 4 digit to be entered.
Thnks in Advance.
#!/usr/bin/python import sys try: inputme = int(raw_input("[-] Enter ur 4-digit PIN : ")) except ValueError: print "[!] hey input numeric only asshole...." sys.exit(1) filteredinput = str(inputme) if len(filteredinput) != 4: print "[!] hey input 4 numeric asshole...." sys.exit(1) """Now inputme length is 4 and it's clean from str""" print "[-] You has inputted %s" % inputme
Sorry, anoda question. Is there any built-in-function that uses the ‘wait technique’ . Smthn lyk
print ‘\nVerifying password’
#then waits for like 5 secs. After d 5secs.It prints out the next statement.
print ‘\nPassword Verified’
#!/usr/bin/python import os print '[-] Verifying password...' time.sleep(5) if password == verified: print '[+] Password Verified' else print '[+] Password Unverified'
i hope that question can answered your question too ;)