Initial Commit

This commit is contained in:
eneller
2025-11-15 08:08:19 +01:00
commit b2ebb960a5
4 changed files with 39 additions and 0 deletions

1
.gitignore vendored Normal file
View File

@@ -0,0 +1 @@
*.sh

5
README.md Normal file
View File

@@ -0,0 +1,5 @@
# OpenWRT Travelmate Auto-Login
Shell scripts that perform automatic logins for the
[Travelmate](https://openwrt.org/docs/guide-user/network/wifi/wifiextenders/travelmate) plugin.
On the device, they live in `/etc/travelmate/*.login` and have to be executable.
Calling arguments can be used and customized.

16
curl.sh Normal file
View File

@@ -0,0 +1,16 @@
curl 'http://10.10.0.1:1000/' \
-X POST \
-H 'User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:144.0) Gecko/20100101 Firefox/144.0' \
-H 'Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8' \
-H 'Accept-Language: en-US,en;q=0.5' \
-H 'Accept-Encoding: gzip, deflate' \
-H 'Content-Type: application/x-www-form-urlencoded' \
-H 'Origin: http://10.10.0.1:1000' \
-H 'Connection: keep-alive' \
-H 'Referer: http://10.10.0.1:1000/fgtauth?007832616a57bf4e' \
-H 'Cookie: pushedAt=Sun Nov 02 2025 07:39:17 GMT+0100 (Central European Standard Time)' \
-H 'Upgrade-Insecure-Requests: 1' \
-H 'Priority: u=0, i' \
-H 'Pragma: no-cache' \
-H 'Cache-Control: no-cache' \
--data-raw '4Tredir=http%3A%2F%2Fkrksistemi.hr%2Frijeka2&magic=007832616a57bf4e&username=Disclaimer+user&password=123'

17
wifi4eu.login Executable file
View File

@@ -0,0 +1,17 @@
#!/bin/sh
# auto-login for https://wifi4eu.ec.europa.eu or general fortigate
# initial request to get magic id
trm_fetch="$(command -v curl)"
trm_domain="http://10.0.1.1:1000"
magic="$($trm_fetch -Ls -o /dev/null -w '%{urle.query}' $trm_domain)"
echo "magic=$magic"
# log in
curl $trm_domain \
-X POST \
-L \
-H "Referer: http://10.10.0.1:1000/fgtauth?$magic" \
--data "4Tredir=https://krksistemi.hr/rijeka2/" \
--data "magic=$magic" \
--data "username=Disclaimer user" \
--data "password=123"