Monday, June 2, 2014

Password Security System in Python


One of the biggest threat in computer system is the issue regarding computer security. Most of us are not aware the computer security is a very important topic to be learned in information technology. We have heard many stories that a certain bank there records is being access by hackers and other computer criminals on the loose. This criminals and hackers can access sensitive information such as credit card numbers and other personal information of the customers and clients of the bank. They can use this information to do transactions online or to sell credit card numbers in the Internet.

There are many security measures that are being developed to protect this sensitive and confidential records. The most common security that we often use is the use of username and password. We use this most of the time to open our email addresses, social media accounts just like Facebook, Twitter, Instagram  and among other social media websites. However the use of username and passwords has many loopholes that we must be aware of we must able to create a password and username that is not easy to understand by other people. As I read books and magazines about computer security scientist and computer experts suggest that the username and password must be a combination of letters,numbers or even special characters in order to have more secure username and password.

In this article I would like to share with your a very simple program that I wrote using Python as my programming language I called this program Password Security System in Python. The code is very simple I just use logical operators in Python that is the and condition and if - else statement. If the user provides invalid username and password our program will continue to ask the user to give the right user name and password by using a while loop statement in our program. Again there are many rooms for improvement of our program this is just a beginning how to write your our password security system in Python.

I hope you find my work useful and thank you very much.


Sample Output of Our Program


Python Integrated Programming Environment

Program Listing

print("\n")
print("$$$==================================$$$")
print("       PASSWORD SECURITY SYSTEM         ")
print("$$$==================================$$$")
complete = False

while complete == False:
 print("");   
 username = input("User Name :>> ").lower().strip()
 password = input("Password  :>> ").lower().strip()

 username1 = "admin"
 password1  = "123"

 username2 = "bill"
 password2 = "12345"

 if (username == username1 and password == password1):
     print("\n");
     print ("Access granted")
     print ("Welcome to the System")
     complete =True
     print("\n");   
     
 elif (username == username2 and password == password2):
     print("\n");
     print ("Access granted")
     print ("Welcome to the System")
     complete =True
     print("\n");   
    
 else:
     print("");
     print ("Access Denied  !!!")
     complete=False
     print("\n");   



No comments:

Post a Comment