Advertisement
Guest User

Untitled

a guest
Jun 24th, 2017
79
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 1.48 KB | None | 0 0
  1.  
  2.  
  3.  
  4.  
  5.  
  6. Reg_Name_User = raw_input("Reg User enter a username: ")
  7. Reg_Name_Pass = raw_input("Reg User enter a password: ")
  8. Reg_User_SQL = [""]
  9. Reg_Pass_SQL = [""] #Hashed.
  10.  
  11. Reg_User_SQL.append(Reg_Name_User)
  12. Reg_Pass_SQL.append(Reg_Name_Pass) #Hashed.
  13.  
  14. print("Server data has been saved")
  15. print(Reg_User_SQL , Reg_Pass_SQL);
  16.  
  17. if Reg_Name_User and Reg_Name_Pass == Reg_User_SQL and Reg_Pass_SQL:
  18.     print("Welcome!")
  19. elif Reg_Name_User and Reg_Name_Pass != Reg_User_SQL and Reg_Pass_SQL:
  20.     print("Password has failed!")
  21.     print("Restart the program to try again.")
  22.  
  23. ToContinue = raw_input("Please press any key to contine")
  24.  
  25. class MySQLQueries()
  26.    def MySQLQuriesDefined()
  27. print("Loading the MySQL Query...")
  28. Reg_Name_SQLQueryINPUT =(Reg_User_SQL, Reg_Pass_SQL)
  29. ... [mysqld]
  30. ... user = mysql
  31. ... pid-file = /var/run/mysqld/mysqld.pid
  32. ... skip-external-locking
  33. ... old_passwords = 1
  34. ... skip-bdb
  35. ... skip-innodb
  36. ... (Reg_User_SQL, Reg_Pass_SQL)
  37. config = ConfigParser.RawConfigParser(allow_no_value=True)
  38. config.readfp(io.BytesIO(Reg_Name_SQLQueryINPUT))
  39. # Settings with values are treated as before:
  40. config.get("mysqld", "user")
  41. 'mysql'
  42.  
  43.  # Settings without values provide None:
  44.  config.get("mysqld", "skip-bdb")
  45.  
  46. if config.get("mysqld", "does-not-exist")
  47. Traceback (most recent call last):
  48.   ...
  49. ConfigParser.NoOptionError: No option 'does-not-exist' in section: 'mysqld'
  50.  
  51. print("SQL Quires saved and loaded")
  52.  
  53. ToContinueNext = raw_Input("Enter any key to continue")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement