Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import time
- import sys
- import webbrowser
- import os.path
- if os.path.exists('hackforums.txt'):
- openfilex = open('hackforums.txt')
- content = openfilex.read()
- splitcontent = content.split(':') #To cut it into 2 parts
- userName = raw_input("Username: ")
- admnName = splitcontent[0]
- if str(userName) == str(admnName):
- userPass = raw_input("Password: ")
- realPass = splitcontent[1]
- if str(userPass) == str(realPass):
- print "Valid Login."
- print "Thanks for DLing my first Program. - Overf1eld"
- exitNow = ''
- while exitNow != "y" or "n":
- exitNow = raw_input("Exit now? If you want to look at the other parts, you will need to restart, i \n have no idea how to make it so you dont have to. -.- <y/n> ")
- if str(exitNow) == "y":
- print "Shutting Down"
- time.sleep(2)
- sys.exit(1)
- if str(exitNow) == "n":
- print "Have fun staring at me."
- else:
- print "Invalid choice, please choose either <y>/<n>"
- else:
- print "Wrong password!!<y/n>"
- time.sleep(1)
- print "Shutting Down"
- time.sleep(.5)
- sys.exit(1)
- else:
- print "Wrong Username!!!"
- time.sleep(1)
- print "Shutting Down"
- time.sleep(.5)
- sys.exit(1)
- else:
- print "You have no account yet! <y/n>"
- createaccInput = ''
- while createaccInput != 'n' or 'y':
- createaccInput = str(raw_input("Would you like to create one y/n \n"))
- if str(createaccInput) == "y":
- openfilex = open('hackforums.txt', 'w')
- usernamex = raw_input("What will your username be? \n")
- passwordxz = raw_input("What will your password be? \n")
- openfilex.write(usernamex + ':' + passwordxz)
- print "You have created An Account!"
- time.sleep(5)
- sys.exit(1)
- if str(createaccInput) == "n":
- print "Shutting Down"
- time.sleep(.5)
- sys.exit(1)
- else:
- print "Invalid choice, please choose either <y>/<n>"
Add Comment
Please, Sign In to add comment