An automation script for Erganis check-in/check-out "roufianos" system
Automate your daily check-in and check-out in Erganis. This script monitors your Google Calendar events for the day and triggers actions on the Erganis platform accordingly.
Roufianomore is a python script that is designed to automate the process of checking in and out of Erganis system. This is the so called "roufianos", that is used to track the time arrivals and departures of employees from/to the office. A system that is outdated but is unfortunatelly still in use today, to help the bosses have a leverage on you. Due to its simplicity and lack of security measures, the script is able to login and check-in/check-out of the system successfully.
Breaking down the steps:
- A GitHub action excecutes based on a cron schedule and runs the scripts.
- The first script checks todays events in Google Calendar.
- Stored events are put in a countdown timer until the event starts and the specified action is triggered
- When the timer ends the event triggers the second script, which handles the requests.
- It starts by fetching the login page and grabbing a verification token from an input in the login form, which is needed for the request.
- Then it bundles the header and the payload, with the secret credentials and token, to send a post request to the login endpoint
https://ergani.softone.gr/Login/***?handler=Login.- The server response is the home page, so the script parses it to find the next token needed for the check-in/check-out requests, again from an input in the form.
- Fortunately, the request header and payload is the same for both check types and the request is sent to the appropriate endpoint, based on the check type
https://ergani.softone.gr/CheckIn/***?handler={check_type}.And that's it! The "roufianos" has completed successfully.
Follow this process to get your own script automation up and running.
-
Fork the repository
-
Setup Google Calendar URL:
-
Create a Google Calendar that you want to monitor for check-in/check-out events.
-
Add events with subjects
CheckinandCheckout.Important Note:
The actions will be excecuted at the start of the events.
The only available event names areCheckinandCheckoutand are not case sensitive.
Only the first instance of each event category will be triggered per day. -
Obtain your calendar's
Secret address in ICAL format(located in the calendars settings) -
Add it as a secret named
GOOGLE_CALENDAR_URLin your GitHub repository.
-
-
Set Credentials:
- Create GitHub secrets for your SoftOne platform credentials:
COMPANY: The Company you work for.USERNAME: Your SoftOne username.PASSWORD: Your SoftOne password.
- Create GitHub secrets for your SoftOne platform credentials:
-
Update GitHub Action's Cron Schedule (Optional):
- The action is configured to run automatically every day at
6:00 AM UTC. This schedule can be adjusted to your preferences by modifying the cron expression in the GitHub Actions workflow file.
# main.yml on: schedule: - cron: '0 6 * * *' # Min Hour DayOfTheMonth Month DayOfTheWeek
- The action is configured to run automatically every day at
-
Monitor Actions:
- Keep track of the script's execution by visiting the GitHub Actions page.
Note: Before relying on this automation, thoroughly review and understand the script's functionality. Ensure that the Google Calendar URL, SoftOne platform credentials, and schedule meet your specific requirements.
Contributions are welcome! If you encounter any issues or have improvements to suggest, feel free to open an issue or submit a pull request.
Buy me a coffee
If you find this script helpful and would like to support the project, consider buying me a coffee!
revolut.me/patriarxis
This project is licensed under the MIT License. Feel free to use and modify the script according to your needs.