metronom login vpn fix
This commit is contained in:
parent
4e6465defe
commit
448211660b
1 changed files with 3 additions and 0 deletions
|
|
@ -3,6 +3,8 @@
|
|||
pkgs.writeShellScriptBin "metronom-login" ''
|
||||
#!/bin/sh
|
||||
|
||||
mullvad disconnect
|
||||
sleep 2
|
||||
netif="$(cat ~/.direct-netif)"
|
||||
echo "netif is (~/.direct-netif) $netif"
|
||||
ip="$(dog -1 wifi.metronom.de @10.101.1.1 A)"
|
||||
|
|
@ -10,6 +12,7 @@ pkgs.writeShellScriptBin "metronom-login" ''
|
|||
csrf="$(curl --interface $(cat ~/.direct-netif) "$ip/de/" | grep CSRFToken | sed -E 's/.*value="([0-9a-f]*)".*/\1/')"
|
||||
echo "csrf is $csrf"
|
||||
resp="$(curl --interface $(cat ~/.direct-netif) "$ip/de/" -X POST -H "Cookie: csrf=$csrf" --data-raw "login=true&CSRFToken=$csrf" | wc -l)"
|
||||
mullvad connect
|
||||
if [ $resp = 0 ] ; then
|
||||
echo OK
|
||||
else
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue