Messages - KynloStephen66515 [ switch to compact view ]

Pages: [1] 2 3 4 5 6 ... 717next
1
Repo: https://github.com/Kynlos/KynlosWebServer



    Kynlos Python Web Server with PHP Support

    This is a Python-based web server that supports serving static files, executing PHP scripts, file uploads, rate limiting, IP whitelisting/blacklisting, HTTPS using self-signed certificates, CORS support, custom error pages, static file caching, Gzip/Brotli compression, basic authentication, virtual hosts, URL redirects, graceful shutdown, browser auto-open, email verification, and SQLite database integration for user management. The server is highly configurable via a `config.json` file.

    Features

      [*]Serves static files from the `htdocs` directory
      [*]Executes PHP scripts using the `php` command
      [*]Supports file uploads via POST requests to `/upload`, with uploaded files saved in the `htdocs/downloads` directory
      [*]Provides a file download page at `htdocs/download.html` for accessing uploaded files
      [*]Rate limiting to prevent abuse (configurable requests per minute and burst limits)
      [*]IP whitelisting and blacklisting for access control
      [*]HTTPS support using self-signed certificates with configurable certificate details and renewal options
      [*]Cross-Origin Resource Sharing (CORS) support
      [*]Serves custom HTML pages for different HTTP error codes (configurable via `config.json`)
      [*]Implements caching for static files to improve performance (configurable cache size and TTL)
      [*]Gzip and Brotli compression for improved transfer speeds
      [*]Basic authentication with configurable authorized users
      [*]Virtual hosts support for hosting multiple websites or domains
      [*]URL redirects for redirecting users from old or outdated URLs to new ones or external websites
      [*]Customizable entry point (default: `index.html`)
      [*]Logging of requests to a log file
      [*]Graceful shutdown on Ctrl-C
      [*]Opens the entry point in a web browser on server start
      [*]Email verification for new user registrations to prevent spam accounts
      [*]SQLite database integration for managing user accounts and enabling user registration and login
      [/list]

      Requirements

        [*]Python 3.x
        [*]`php` command available in PATH (for PHP script execution)
        [*]`OpenSSL` Python library (for HTTPS support)
        [*]`sqlite3` Python library (for SQLite database integration)
        [/list]

        Configuration

        The server can be configured using a `config.json` file in the same directory as the script. The following options are available:

          [*]`port`: The port number to run the server on (default: 80)
          [*]`entry_point`: The default file to serve when accessing the root URL (default: `index.html`)
          [*]`use_https`: Whether to enable HTTPS using a self-signed certificate (default: `false`)
          [*]`certfile`: The path to the certificate file for HTTPS (default: `cert.pem`)
          [*]`keyfile`: The path to the private key file for HTTPS (default: `key.pem`)
          [*]`rate_limit`: The maximum number of requests per minute per IP (default: 10)
          [*]`rate_limit_burst`: The maximum number of burst requests allowed (default: 5)
          [*]`log_file`: The path to the log file for request logging (default: `server.log`)
          [*]`whitelist`: A list of IP addresses that are allowed to access the server (default: [])
          [*]`blacklist`: A list of IP addresses that are blocked from accessing the server (default: [])
          [*]`htdocs_dir`: The directory to serve static files from (default: `htdocs`)
          [*]`downloads_dir`: The directory to save uploaded files to (default: `htdocs/downloads`)
          [*]`cert_config`: Configuration options for generating the self-signed certificate
             
            [*]`key_size`: The size of the private key in bits (default: 2048)
                [*]`subject`: The subject information for the certificate
                   
              [*]`C`: Country (default: US)
                      [*]`ST`: State (default: California)
                      [*]`L`: Locality (default: San Francisco)
                      [*]`O`: Organization (default: My Company)
                      [*]`OU`: Organizational Unit (default: My Organization)
                      [*]`CN`: Common Name (default: localhost)
                      [/list]
                  [*]`serial_number`: Serial number (default: 1000)
                  [*]`valid_days`: Number of days the certificate is valid for (default: 3650)
                  [*]`signing_algorithm`: The signing algorithm to use (default: sha256)
                  [/list]
              [*]`cert_renewal_days`: The number of days before certificate expiration to renew (default: 30)
              [*]`cache_max_size`: The maximum size of the static file cache in bytes (default: 10485760)
              [*]`cache_ttl`: The time-to-live (TTL) for cached files in seconds (default: 60)
              [*]`enable_gzip_compression`: Whether to enable Gzip compression (default: true)
              [*]`enable_brotli_compression`: Whether to enable Brotli compression (default: true)
              [*]`enable_basic_auth`: Whether to enable basic authentication (default: false)
              [*]`auth_users`: A dictionary of authorized usernames and passwords for basic authentication
              [*]`enable_virtual_hosts`: Whether to enable virtual hosts support (default: false)
              [*]`virtual_hosts`: A dictionary of virtual host mappings, with each key representing a domain and the value specifying the `htdocs_dir` and `entry_point` for that domain
              [*]`enable_custom_error_pages`: Whether to enable custom error pages (default: false)
              [*]`error_pages`: A dictionary mapping HTTP error codes to custom HTML pages
              [*]`redirects`: A dictionary of URL redirects, with each key representing the old URL and the value specifying the new URL or external website
              [*]`enable_email_verification`: Whether to enable email verification for new user registrations (default: false)
              [*]`smtp_config`: Configuration options for sending verification emails via SMTP
                 
                [*]`host`: SMTP server hostname
                    [*]`port`: SMTP server port
                    [*]`username`: SMTP username
                    [*]`password`: SMTP password
                    [*]`use_tls`: Whether to use TLS encryption (default: true)
                    [*]`from_email`: The email address to send verification emails from
                    [/list]
                [/list]

                Usage

                [list=1]
                [*]Clone the repository or download the `main.py` file.
                [*]Create a `config.json` file in the same directory as `main.py` with your desired configuration options.
                [*]Place your static files and PHP scripts in the `htdocs` directory or subdirectories.
                [*]Run the server using `python main.py`.
                [*]Access the server in a web browser at `http://localhost` (or the configured port).
                [*]Upload files via the `/upload` endpoint and access them from the `htdocs/download.html` page.
                [*]Register new user accounts and verify email addresses to enable user-specific features.
                [/list]

                Contributing

                Contributions are welcome! If you find any issues or have suggestions for improvements, please open an issue or submit a pull request.

                License

                This project is open-source and available under the MIT License.

                Repo:

                https://github.com/Kynlos/KynlosWebServer

                2
                Kynlo's Software / Login Script with PHP and SQLite
                « on: March 13, 2024, 10:37 PM »
                Login Script with PHP and SQLite

                This repository contains a simple and secure login script implemented in PHP with an SQLite database for user authentication. The script offers features such as:

                User registration: Users can create new accounts by providing a username, email, and password.
                User login: Registered users can log in using their credentials to access their dashboard.
                User dashboard: After logging in, users are redirected to their personalized dashboard where they can view their profile information and submit messages.
                Message submission: Users can submit messages through a form on their dashboard.
                Public messages: All users can view the public messages submitted by other users.
                User messages: Users can view and manage their own messages, including editing and deleting them.

                Requirements

                • PHP 7.0 or higher
                • SQLite3 extension enabled
                • Web server (e.g., Apache, Nginx)
                • Python 3.x (for running the database creation script)

                Setup

                • Clone the repository to your local machine.
                • Run the cr_db.py script to create the SQLite database file.
                • Configure your web server to serve the PHP files.
                • Access the login page (index.php) in your browser and start using the script.

                Usage

                • Navigate to the login page (index.php).
                • Enter your username/email and password.
                • Click on the "Login" button.
                • Upon successful authentication, you will be redirected to the dashboard page (dashboard.php).

                Security

                • Passwords are securely hashed using PHP's built-in password_hash() function before storing them in the database.
                • User input is sanitized and validated to prevent SQL injection and cross-site scripting (XSS) attacks.
                • Sessions are used to manage user authentication and maintain logged-in state.

                License

                This project is licensed under the MIT License. See the LICENSE file for details.

                GitHub Repository

                Visit the KynlosLoginScript repository for more information.

                Contributions

                Contributions are welcome! Feel free to open issues and pull requests to suggest improvements or report bugs. Donations towards the project are also HIGHLY welcomed!

                3
                Hello & good day Kynlo! Just wanted to cheer you up on the new section & releases :Thmbsup:

                Keep up the good work!

                (P.S.: I'm your first follower on GitHub --you'll surely grow a following in no time)

                Cheers!
                Vic

                -publicdomain (March 06, 2024, 08:01 PM)

                Hey Vic!

                Thanks for the follow, but I feel I should be honest and mention you're not the first {actually, you are, turns out I was thinking starred, not followers [oops]} (and I'm sponsored on GH for another project on there haha).

                Followed you back though :)

                4
                Kynlo's Software / How to contribute!
                « on: March 06, 2024, 07:10 PM »
                Help Keep the Code Flowing with a Cup of Coffee! ☕

                If you've found my software helpful and want to lend a hand in keeping the code flowing, why not consider buying me a cup of coffee? Your support can help fuel late-night coding sessions and keep the creativity brewing!

                1. Why Donate?

                Your donation directly supports my work as a sole developer, enabling me to dedicate more time and energy to creating and maintaining high-quality software. Whether it's fixing bugs, adding new features, or improving documentation, your contribution helps ensure that the projects you love continue to thrive.

                2. How Your Donation Helps:

                - Fueling Creativity: A cup of coffee can work wonders for productivity and creativity. With your support, I can stay energized and focused on delivering top-notch software that meets your needs.
                - Covering Expenses: Developing and maintaining software comes with various expenses, including hosting fees, domain registrations, and software licenses. Your donation helps cover these costs, ensuring that the projects remain freely accessible to everyone.
                - Showing Appreciation: Your donation is a tangible way to show your appreciation for the work put into the projects. It motivates me to continue coding like crazy and striving for excellence in everything I do.

                3. How to Donate:

                If you'd like to contribute and help keep the code flowing, you can buy me a cup of coffee by visiting:

                - Stripe
                - PayPal

                Support me via DonationCredits:
                If you prefer to use DonationCredits, you can support me here.

                Thank you for considering supporting my projects. Your generosity helps fuel my passion for coding and enables me to continue creating software that makes a difference in the lives of users like you.

                Cheers to the power of coffee and the endless possibilities it brings to the world of coding!

                5
                RepoRover - GitHub Repository Automation Companion 🚀

                Overview
                Welcome to RepoRover, your indispensable companion for seamlessly navigating the expansive realm of GitHub repositories! 🌌 This Python script, aptly named RepoRover (reporover.py), brings a touch of sophistication to your repository-related tasks, making automation both enjoyable and efficient.

                Features
                  [*] Commit Exploration: Embark on an insightful journey through commit history, unraveling the details of each SHA, message, author, and date.
                  [*] Real-time Console Updates: Stay informed with dynamic updates in the console as RepoRover diligently explores the GitHub cosmos.
                  [*] Tailored Log Files: Craft individual log files for each repository, capturing changes with the precision of a seasoned explorer.
                  [*] Consolidated Log Hub: Assemble all logs into a unified hub for a comprehensive view of your GitHub ventures.
                  [*] HTML Data Maps: Generate HTML logs for a polished and organized representation, enhancing your journey through repositories.
                  [*] Configuration Mastery: Harness the power of RepoRover's customizable behavior through the config.ini file, offering flexibility and control.
                  [*] Database Integration Excellence: Store repository data in an SQLite database, creating a robust archive of historical changes.
                  [/list]

                  Usage
                    [*] Plot your course by configuring repository URLs in the config.ini file under the [GitHubRepos] section.
                    [*] Tailor your journey with preferences, scheduling, HTML logs, and database options in the config.ini file.
                    [*] Launch RepoRover using the command: [/list]
                    python reporover.py
                    , and witness its automatic navigation through the GitHub galaxy, uncovering the intricacies of each repository.
                    [/list]

                    Configuration Options
                      [*] GitHub Token: Secure your GitHub token in the config.ini file under the [GitHub] section.
                      [*] Log Preferences: Choose the specific information to log, such as stars, forks, popularity comparisons, and latest releases.
                      [*] Scheduling Mastery: Set the time interval for RepoRover to embark on its automatic explorations.
                      [*] HTML Logging Elegance: Toggle HTML log generation for visually appealing representations of your GitHub expeditions.
                      [*] Database Integration Wisdom: Decide whether to store repository data in a robust database and specify the database file.
                      [/list]

                      Getting Started
                        [*] Ensure you have Python installed and are ready for a productive coding session.
                        [*] Configure your config.ini file with repository URLs and preferences.
                        [*] Install required packages by running:
                        pip install beautifulsoup4 github3.py tqdm
                        .
                        [*] Launch RepoRover using the command:
                        python reporover.py
                          .
                        Note: If you haven't set a GitHub token, RepoRover will prompt you during its exploration.

                        Embark on your GitHub journey with RepoRover, and may your code explorations be both enriching and enjoyable! 🌟🚀 If you have any questions or wish to share your experiences, feel free to reach out. Happy coding! 🌌✨

                        Known Issues
                        HTML Output and Combined Outputs are not currently filling with data. Will be fixed in a future update.



                        Link: https://github.com/Kynlos/RepoRover

                        Pages: [1] 2 3 4 5 6 ... 717next
                        Go to full version