khrj/bits-auto-campnet — reverse-engineered prompt
Reverse engineered prompt
Build me a tiny tool that keeps my BITS Goa Campnet internet logged in automatically. I want to put my Sophos username and password in a local .env file, using SOPHOS_USERNAME and SOPHOS_PASSWORD, and the tool should use those to log in whenever the campus network blocks access.
It should keep checking a simple connectivity test like captive.apple.com every 5 seconds. If the internet is working, it should just wait quietly. If it detects the captive portal, it should submit the login to the Campnet Sophos page on port 8090 and print a simple log message so I know what happened.
Please make it usable in two ways, as a plain shell script I can download and run with bash, and as a Docker Compose setup I can start and stop easily. Add a short README with setup steps, and make sure the .env file is ignored so my password is not committed.
Want more depth? Deep Reverse