Skip to main content

Simple login script

Project description

Simple file-based authentication system with messaging, permissions, and moderation.

DocumentationReport BugRequest Feature


🌟 Why This Project?

  • Fully customizable and easy to extend
  • Includes real-world features (messaging, permissions, banning, etc.)
  • Lightweight — no database required

✨ Features

  • 🔑 User authentication (login & signup)
  • 🔒 Password hashing using SHA-256
  • 📬 User-to-user messaging
  • 📥 Mailbox system (read, send, clear)
  • 🛡️ Permission system (tiers 1–5)
  • ⬆️ User promotion system
  • 🚫 User banning system
  • ❌ Account deletion
  • 🛠️ Initial setup mode

🔐 System Overview

This system uses plain text files as a simple, lightweight database.

📁 Data Storage

  • users.txt → Stores usernames and hashed passwords
  • bannedusers.txt → Stores banned usernames
  • user_(id).txt → Stores user permissions
  • mailbox_(username).txt → Stores user messages

🛠️ First-Time Setup

Run the program and type:

setup

This will:

  • Create a default admin account
  • Grant admin permissions

Default credentials:

  • Username: setup
  • Password: setup

⚠️ Important: Delete this account after creating your own admin account.


🧑‍💻 Usage

At startup, choose:

  • log in
  • sign up
  • setup

📜 Commands

Command Description
help Show all commands
date/time Shows the current date and time
message Send a message to a user
readmail Read your mailbox
promote Promote a user (requires permission)
ban Ban a user
banusername Ban a username from use for a new account
deleteaccount Delete your account
changelog View changes
quit Exit the program

🚫 Banning System

  • Stored in bannedusers.txt

When a user is banned:

  • Their account is removed
  • Their mailbox is deleted
  • Their username cannot be reused

🔮 Planned Features

  • Improved security (salted hashing, validation)
  • Better error handling
  • Cleaner code structure
  • Database support (SQLite)
  • Logging system
  • Admin tools / interface

🤝 Contributing

  • 🐛 Found a bug? Open an issue
  • 💡 Have an idea? Suggest a feature
  • 🔧 Want to improve the code? Submit a PR

All contributions are welcome.


🤖 AI declaration

Used copilot for deployment to PyPi and chatgpt for simple bug fixes early on


📄 License

This project is free to use for educational purposes.


Made with learning in mind.
If you like it, consider ⭐ starring the repo!

I will try to update this program once in a while so I have a changelog aswel.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

simple_login_system-0.1.2.tar.gz (43.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

simple_login_system-0.1.2-py3-none-any.whl (31.4 kB view details)

Uploaded Python 3

File details

Details for the file simple_login_system-0.1.2.tar.gz.

File metadata

  • Download URL: simple_login_system-0.1.2.tar.gz
  • Upload date:
  • Size: 43.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.1

File hashes

Hashes for simple_login_system-0.1.2.tar.gz
Algorithm Hash digest
SHA256 3b62f1e0db00708ac2147499072e84b98aac2a4ebd3c1ea2e7e0344ba237671f
MD5 45836b621e051a746ade94dd85e85725
BLAKE2b-256 ce67ed11a527ad60665197640a57b1af8f823be437475cb78b82c88d9288fb77

See more details on using hashes here.

File details

Details for the file simple_login_system-0.1.2-py3-none-any.whl.

File metadata

File hashes

Hashes for simple_login_system-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 b3fbf686a8f0362a6843a71d1bd33fb952105ec194364df7ec1077e17d84c85d
MD5 b3fa3d42265e34beccd5fd54401b9341
BLAKE2b-256 d169e68024f611ab24fc6b4171fda4a4b26d3186714d0c3723bc5497651b76a1

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page