Skip to content
This repository has been archived by the owner on Aug 17, 2022. It is now read-only.

Latest commit

 

History

History
56 lines (43 loc) · 2.73 KB

README.md

File metadata and controls

56 lines (43 loc) · 2.73 KB

Auto Health Screen

Automatic System to login to the DOE portal and then fill out the daily health screening form. Option to run the code locally or be hip and cool and use AWS Lambda to fully automate this. Using aws you can fill it out once and never do it again

Installation and usage

Running this locally:

  1. Clone the repo git clone https://github.com/ex4722/Auto_screen.git
  2. Move into that directory cd Auto_screen
  3. Install requirements pip install -r requirements.txt
  4. Create a .env file with your credentials
FirstName = "foobar"
LastName = "baz"
OSIS = "000000000"
username = "foobarbaz0"
password = "Password123"
  1. Run the script
  2. ?????
  3. Profit

Using AWS

  1. Create an aws account, the free tier will work for this

  2. Download the upload.zip file only

  3. On the aws page create a new function at https://console.aws.amazon.com/lambda/home?region=us-east-1#/create/function

  4. Select the normal code package, select python3.9 from the drop-down menu, and then create the function image

  5. Select Upload From > .zip and select the file named upload.zip image

  6. Select Configuration > Environment variables > Edit image

  7. Add in FirstName, LastName, OSIS, password and username (Casing matters here) image

  8. On the home dashboard select Add Trigger and search for CloudWatch Events image

  9. Create a new rule, name it anything, Schedule Expression for Rule type, and Set Schedule Expression to cron(0 10 * * ? *). The 10 in this equation means 10AM in UTC time which is 6AM in GMT-4. Change this number to suit your needs

image

  1. Fun and Profit

How it works

Check out the how-it-works page to see an in-depth explanation

tl;dr : Hits the login page from the portal to get cookies, logins with cookies to get OAuth keys to the kingdom, redeems those keys at an endpoint to get login cookies, uses login cookies to submit the form as the user

Todo

  • Add a function to screenshot the success message so users can SMS the image to themselves
  • Clean up the code with functions and more comments

Don't blame me if anyone comes knocking at your door