Last active
November 12, 2018 08:22
-
-
Save Steffo99/8035ab51782d814d646a3dfc7e9e4c2c to your computer and use it in GitHub Desktop.
Login Unimore
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/zsh | |
| killall dhcpcd | |
| ip link set wlp10s0 up | |
| iw dev wlp10s0 connect 'UNIMORE' | |
| dhcpcd wlp10s0 | |
| if [ $? -ne 0 ]; then | |
| echo "\033[1;31mConnessione fallita: non è stato ottenuto un indirizzo IP valido." | |
| exit 1 | |
| fi | |
| python utils_autologin_unimore.py | |
| echo "\033[1;32mConnessione a UNIMORE riuscita." |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import requests | |
| credentials = { | |
| "user": "000000", | |
| "password": "XXXXXXXX" | |
| } | |
| requests.post("https://c0.wifi.unimo.it/cgi-bin/login", data=credentials) | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment