topbanner_forum
  *

avatar image

Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
  • Sunday May 19, 2024, 12:03 pm
  • Proudly celebrating 15+ years online.
  • Donate now to become a lifetime supporting member of the site and get a non-expiring license key for all of our programs.
  • donate

Recent Posts

Pages: [1] 2 3 4 5 6 ... 10next
1
Kynlo's Software / Python Web Sever
« Last post by KynloStephen66515 on Today at 09:26 AM »
    [h1]Python Web Server with PHP Support[/h1]

    This is a Python-based web server that supports serving static files, executing PHP scripts, file uploads, rate limiting, IP whitelisting/blacklisting, and HTTPS using self-signed certificates. The server is highly configurable via a `config.json` file.

    [h2]Features[/h2]

    • Serves static files from the current directory
    • Executes PHP scripts using the `php` command
    • Supports file uploads via POST requests to `/upload`
    • Rate limiting to prevent abuse (configurable requests per minute)
    • IP whitelisting and blacklisting for access control
    • HTTPS support using self-signed certificates
    • 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

    [h2]Requirements[/h2]

    • Python 3.x
    • `php` command available in PATH (for PHP script execution)
    • `OpenSSL` Python library (for HTTPS support)

    [h2]Configuration[/h2]

    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: 8080)
    • 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`)
    • cert_config: Configuration options for generating the self-signed certificate (default: `{}`)
       
      • 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`)
         
      • serial_number: Serial number (default: `1000`)
         
      • valid_days: Number of days the certificate is valid for (default: `3650`)
         
    • rate_limit: The maximum number of requests per minute per IP (default: `10`)
    • 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: `[]`)
    • log_file: The path to the log file for request logging (default: `server.log`)
    [h2]Usage[/h2]

    [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 same directory or subdirectories.
    • Run the server using `python main.py`.
    • Access the server in a web browser at `http://localhost:8080` (or the configured port).

    [h2]Contributing[/h2]

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

    [h2]License[/h2]

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



    Repo: https://github.com/K...nlos/KynlosWebServer


    IMG_20240518_220401.jpg
    2
    Living Room / Re: Arizona sunsets
    « Last post by Arizona Hot on Today at 07:35 AM »
    DSC02957.JPG    DSC02959.JPG

    A Arizona Hooded Oriole came back for more.

    3
    Yep, looks like points 1 and 2 are fixed indeed, thanks! :)
    I'll let you know if I find anything else.
    -ConstanceJill (May 18, 2024, 01:37 AM)
    :up:
    4
    i thought up a solution to different films having different years.

    i think having a "year mismatch" output list :D
    5
    another feature:
    a count of matched/unmatched strings would be nice
    auto saving of matches/unmatched to default .txt names
    drag and drop lists?
    command line interface if possible ?
    6
    Yep, looks like points 1 and 2 are fixed indeed, thanks! :)
    I'll let you know if I find anything else.
    7
    2.1.0 build 71 BETA - BETA Download Page
    (Maybe last beta build before a general release build if things are appearing to be polished.)

    1. Reverted the launch file exists check to the before method.
    2. Fixed minor annoyance with variable field being cleared.
    3. Added warning if a button uses the variable text and the variable bar is hidden. (Upon attempting to launch.)

    Let me know if this one fixes the 2 above issues you mentioned.
    8
    i think fuzzy matching will fix pretty much all these issues.

    if you need more sample list just do a dir /a /s > list1.txt and compare it to the same list. good for stress testing mem and cpu usage as well.
    9
    Thanks! :)

    So I extracted 2.1.0 build 70 BETA and tried running a few commands on my work computer, but I ran into a an error with a few of them.

    For example, I have a button with the following settings :

    Image File: <appdir>icons\Ping.png
    Application: ping.exe
    Application Arguments :-t <var>
    Start in:
    Button Caption: Ping -t
    Command Window : Skip (Direct Launch)
    Ignore : Variable Whitespace
    When trying to run that command, I'm met with the following error message:
    Launch cancelled. Application file listed bellow is missing.

    ping.exe

    Same problem with buttons that I set to direct launch mstsc.exe, explorer.exe or mmc.exe

    From what I gathered, it would seem that, when using "Direct Launch" only, when the full path to the application is not specified, this version of the program tries to check if it finds the program in the PATH, but fails to find it.
    However, it does find and launch successfully some third party executables that I've placed in other folders, which I added to my system PATH, without having their paths spelled out in the button settings.
    I suspect that it probably has to do with the PATH relying on the %SystemRoot% environment variable for executables that ship with Windows (?)

    Replacing the setting in the button with "%systemroot%\system32\ping.exe" also does not fix the problem, I have to put "C:\Windows" in place of "%systemroot%".


    Another minor annoyance that I noticed is that, after editing a button, the contents of the Variable field is emptied.
    -ConstanceJill (May 17, 2024, 06:07 AM)

    I will fix the annoyance. I will also remove the file exists check to let it catch files not found as before which should fix the other issue too.
    10
    The old version of the official website is offline, and the new version is very stuck on the machine
    What do you mean by "the new version is very stuck on the machine" ?

    Where can I find the plugin for the FileHamster 1.x era
    If they're still selling the software with plugins, I dont think I can (legally) share plugins.
    What I have is version 2 anyways ...
    Pages: [1] 2 3 4 5 6 ... 10next