Automatic sign-in for Singapore's MOE's SWN@SSOE network.
AutoSWN is a bash script that will sign you into the SWN@SSOE network. It uses cURL to post the required data to sign in to the network.
Ideally, you should run this script every time you connect to SWN@SSOE for you to be signed into the network. You could hook it to your network manager or something similar...
- In the Windows search box, search for "Powershell" and run it.
- Run these commands by copying and pasting them into the terminal that opens up:
if (Test-Path -Path ~/Desktop) {
$DESKTOP_PATH = "$env:USERPROFILE\Desktop"
} else {
$DESKTOP_PATH = "$env:USERPROFILE\OneDrive\Desktop"
}
Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser
curl.exe https://raw.githubusercontent.com/Walnit/AutoSWN/main/swn.ps1 | out-string | Out-File -FilePath "$DESKTOP_PATH\AutoSWN.ps1"
Unblock-File -Path "$DESKTOP_PATH\AutoSWN.ps1"
- A file named
AutoSWN.ps1
should appear on your desktop. To run the file, you can right click and choose "Run with Powershell" to run. - Follow the instructions when you first run the file to set up authentication.
- From the files above, download
swn.sh
. - Ensure
curl
,sed
andbash
are installed. - Create a file named
.swnconfig
in your home directory. The first line of your file should be your username (usually [email protected]), and the second line should be your password. - Download
swn.sh
and make it executable. ./swn.sh
If you want this for Mac, install Linux instead >:)