GithubHelp home page GithubHelp logo

simple-login-system-in-python's Introduction

Simple Login System

This Python script provides a basic command-line interface for a login system, allowing users to register new accounts with a username and password, and then log in using their credentials. The system uses password hashing for security, ensuring that passwords are not stored in plain text.

Features

User Registration: New users can register by choosing a unique username and a password. The password is hashed before it is stored, enhancing security. User Login: Registered users can log in by entering their username and password. The system verifies the hashed password, granting access only if the credentials match. Password Hashing: Uses the bcrypt library for secure password hashing. Secure Password Input: Passwords are entered securely, hiding input from shoulder surfers.

The script requires the following Python libraries:

ast: For safely evaluating strings containing Python expressions from a simple database file. logging: For logging errors and system messages. bcrypt: For hashing and verifying passwords. base64: For encoding and decoding hashed passwords as strings for storage. getpass: For secure password input that doesn't echo characters on the terminal.

File Storage

User credentials (usernames and hashed passwords) are stored in a plain text file named database.txt. Each line in the file represents a user account in the form of a Python dictionary literal, e.g., {'username': 'john_doe', 'password': 'hashed_password'}.

simple-login-system-in-python's People

Contributors

olijag avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.