Automate your sign-in to the KMUTNB Software Center and trigger an Adobe license reservation in one shot.
This repository contains a minimal Python script that:
- Loads your credentials from environment variables.
- Logs in to
https://software.kmutnb.ac.th/login/.
Intended audience: students and staff who already have legitimate access and permissions granted by KMUTNB. Use responsibly and in accordance with the university policies and the website's terms of service.
Caution
This script is provided for personal convenience where automation is permitted. You are responsible for complying with KMUTNB policies and all applicable terms of service. Do not use this script to circumvent security, access controls, or usage limits.
High-level flow:
- Load
USERNAMEandPASSWORDfrom a local.envfile usingpython-dotenv. - Create a
requests.Sessionto persist cookies between requests. - POST credentials to the login endpoint.
- POST to the Adobe reservation endpoint (
/adobe-reserve/add2.php) with required payload. - Print the raw response (HTML) from the Adobe endpoint so you can verify success.
- Python 3.9+ recommended.
- A valid KMUTNB account with access to Adobe reservation.
- Network access to
software.kmutnb.ac.th.
-
Create and activate a virtual environment (recommended):
- Windows (PowerShell): run
python -m venv .venvthen.venv\Scripts\Activate.ps1 - macOS/Linux (bash/zsh): run
python3 -m venv .venvthensource .venv/bin/activate
- Windows (PowerShell): run
-
Install dependencies:
pip install -r requirements.txt
-
Create a
.envfile in the project root with the following contents:USERNAME=your_usernamePASSWORD=your_password
Notes:
- The
.envfile is ignored by version control. Do not commit secrets. - You can also export environment variables instead of using
.env.
- From the project root, run:
- Windows:
python src/payload.py(or use.venv\Scripts\python.exe src\payload.pyif using a venv) - macOS/Linux:
python3 src/payload.py
- Windows:
What to expect:
- The script prints the raw HTML returned by the Adobe reservation endpoint. Look for cues like a success message or confirmation text specific to the site. If the site’s response changes over time, you may need to adjust how you detect success.
You can run the script on a schedule to keep your reservation active or to automatically request access at specific times. Be sure this aligns with site policies.
-
Windows Task Scheduler:
- Open Task Scheduler and create a new Basic Task.
- Set a trigger (daily/weekly).
- Action: Start a program.
- Program/script: full path to your Python interpreter (e.g.,
C:\path\to\Auto-Adobe\.venv\Scripts\python.exe). - Add arguments:
src\payload.py - Start in: the project directory (e.g.,
C:\path\to\Auto-Adobe) - Ensure the
.envfile is present in the working directory or use system environment variables.
-
Linux/macOS cron:
- Activate your venv or reference it explicitly in your cron line.
- Add a cron entry such as:
0 8 * * 1-5 /path/to/Auto-Adobe/.venv/bin/python /path/to/Auto-Adobe/src/payload.py
- Ensure environment variables are available to cron (either set globally or use a wrapper script that sources them).
-
systemd timer (Linux):
- Create a service that runs your venv’s Python with
src/payload.py, and pair it with a.timerunit. Make sure the serviceWorkingDirectoryis the repository root so the.envloads.
- Create a service that runs your venv’s Python with
- Login fails (401/403 or redirected back to login):
- Verify
USERNAMEandPASSWORDare correct. - The site may require additional tokens (CSRF) or a prior GET to establish cookies. You may need to:
- Perform a GET to the login page and parse hidden inputs.
- Carry those tokens into the POST request.
- The site may have introduced CAPTCHA or other bot protection, which will block automation.
- Verify
- Never commit
.envor credentials. The.gitignorein this project already ignores.env. - Rotate your password periodically and immediately if you suspect compromise.
- Use a separate, least-privilege account for automation if possible.
- When scheduling, ensure the account running the task has access to the
.envsecurely and that logs do not dump secrets. - Prefer enabling SSL verification to mitigate MITM risks.