r/programmingrequests • u/EnvironmentalPilot9 • Mar 31 '20
Help me bypass my school attendance
Hello friends,
I am currently a high school senior who has recently been put on a treadmill for the last half mile of an 18-year race.
I have sleep insomnia(not because of my phone or video games) and I would like to get more than 4 hours of sleep a night so here's my problem:
My school does attendance by having us take a google forms survey open from 8am-9am. The google form is attached to my email and its the same google form every day.
There is no CAPTCHA and its two basic input variables.
I know the basics of JScript and HTML and I am willing to learn but I am also open to someone doing a heroic deed for a teenager in need ¯_(ツ)_/¯
Any tips or heroic deeds are much appreciated!
Thank you.
6
u/tylerlmz1 Mar 31 '20
You can look into Selenium, it is a browser automation tool, and might help you achieve this
6
u/ky1-E Mar 31 '20
if it's the same form every time, it'll probably be easier (but hackier) to set it up using AutoHotkey. You can get a script to record your keystrokes and mouse movements and save it as a AHK file (Maybe this?), and then you can use Task Scheduler or something to run every day at 8 am.
6
u/green_griffon Mar 31 '20
Check back in 10 years when OP is a world-class programmer and it all started trying to hack their attendance checker to let them sleep in.
1
u/tylerlmz1 Apr 01 '20 edited Apr 01 '20
u/EnvironmentalPilot9, I've found an easy way to do it
but it requires you to submit the form manually once
I recommend you practice with a dummy google form you created yourself before you do it with the real form.
here's how to do it
go to the form, and before you submit, press F12, the developer tools will open up, press "Network" Tab
then submit your form with the form answers filled
the network tab will appear a row with "POST" at the "method" column
this is the network request your browser made to submit the form, now right click that row, click copy as cURL
then, create an empty file with ".ps1" extension (for example script.ps1)
paste the copied content into the file
then put this line before the line you pasted
so the file will have two lines, first line is the start-sleep, the second will be the curl command you pasted
you will need to install curl
then run the script with powershell before you sleep, it will submit the form at the time specified
1
u/SBAPKat Apr 01 '20
Lynx is a text based browser that natively supports input-based scripting, I use it to automatically connect to my wifi's captive portal