CuimsBot is an automation script designed to streamline the login process for the University Information Management System (UIMS) of Chandigarh University (CU). This bot automates the login steps, including capturing and solving CAPTCHA challenges, to provide a seamless and faster login experience.
The script uses Selenium WebDriver to automate browser interactions, along with Python libraries like Pillow (PIL) for image processing and pytesseract for Optical Character Recognition (OCR) to solve CAPTCHAs.
- Automatic Login: Logs into UIMS with a student ID and password.
- CAPTCHA Handling: Solves CAPTCHA using OCR to bypass manual intervention.
- Cross-Browser Compatibility: Currently using ChromeDriver, but can be extended to other browsers.
- Image Processing: Captures CAPTCHA image, processes it with OCR, and enters the CAPTCHA value.
- Python 3.x (Preferably Python 3.8+)
- Selenium: For web automation.
- Pillow (PIL): For image processing (used to open and manipulate CAPTCHA images).
- pytesseract: Python binding for Google's Tesseract OCR, used to solve CAPTCHA.
- ChromeDriver: Ensure that the
chromedriverversion is compatible with your installed version of Google Chrome.
You can install the necessary dependencies by running the following command:
pip install selenium Pillow pytesseractAdditionally, you need to install Tesseract on your machine. You can download it from the official repository: Tesseract GitHub.
git clone https://github.com/Ayush-Thakur-geek/Login_To_Uni_Website_Bot.gitEnsure that Tesseract is properly installed on your system. If you're on a Linux system, you can install it using:
sudo apt install tesseract-ocrCreate a file named essentials.py to store your UID and Password securely.
# essentials.py
uid = "your_student_id"
pwd = "your_password"Execute the script to perform the automated login:
python -i cuims_bot.pyNote: Make sure to run it in interactive mode
-
Navigate to the UIMS Website:
The bot opens the UIMS login page and clicks on the student login button. -
Switch to Login Window:
It switches to the new window (after clicking "Login"). -
Fill in Student ID and Password:
It automatically inputs the student ID and password stored in theessentials.pyfile. -
Solve CAPTCHA:
The bot takes a screenshot of the CAPTCHA, processes it with Tesseract to extract the text, and enters it into the CAPTCHA input field. -
Login:
Finally, it clicks the "Login" button to complete the login process.
-
Captcha Image Not Clear:
Sometimes Tesseract may not be able to accurately solve the CAPTCHA if the image quality is low. You can try adjusting the image quality using Pillow methods like resizing or enhancing the contrast. -
ChromeDriver Compatibility Issues:
Ensure the version of ChromeDriver installed matches the version of Google Chrome you have. -
Missing Dependencies:
If you face issues with missing libraries, ensure you have all the required dependencies installed viapip.
-
Browser Profile Management:
Automating browser sessions with saved credentials and session management for a faster login experience. -
Error Handling:
Improve error handling and retries in case of failed CAPTCHA recognition or login. -
GUI Version:
A graphical interface where students can enter their credentials and interact with the bot without modifying code.
This project is open-source and available under the MIT License.
- Ayush Thakur
Feel free to fork, contribute, or make modifications to the project!