summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAnton Luka Šijanec <anton@sijanec.eu>2023-09-25 22:20:38 +0200
committerAnton Luka Šijanec <anton@sijanec.eu>2023-09-25 22:20:38 +0200
commit19df3a815b0562f336f1758a11a334905076a2ad (patch)
treed085a6391c96e6c69a4646ec80713349b364f008
parenttrap exit tmpfile on sponge*.sh (diff)
downloadr-19df3a815b0562f336f1758a11a334905076a2ad.tar
r-19df3a815b0562f336f1758a11a334905076a2ad.tar.gz
r-19df3a815b0562f336f1758a11a334905076a2ad.tar.bz2
r-19df3a815b0562f336f1758a11a334905076a2ad.tar.lz
r-19df3a815b0562f336f1758a11a334905076a2ad.tar.xz
r-19df3a815b0562f336f1758a11a334905076a2ad.tar.zst
r-19df3a815b0562f336f1758a11a334905076a2ad.zip
-rwxr-xr-xskripti/spremeni_geslo_ul.sh11
1 files changed, 11 insertions, 0 deletions
diff --git a/skripti/spremeni_geslo_ul.sh b/skripti/spremeni_geslo_ul.sh
new file mode 100755
index 0000000..f2e5686
--- /dev/null
+++ b/skripti/spremeni_geslo_ul.sh
@@ -0,0 +1,11 @@
+#!/bin/bash
+set -xe
+echo vpiši trenutno geslo
+read s
+echo vpiši novo geslo
+read n
+p=`rev <<<$0 | cut -d/ -f1 | rev`
+t=`mktemp -p "" $p.XXX`
+trap "rm $t" EXIT
+r=`curl --cookie $t --cookie-jar $t https://id.uni-lj.si/DigitalnaIdentiteta/SpremembaGesla | grep RequestVerificationToken | tail -n1 | cut -d\" -f6`
+curl --cookie $t --cookie-jar $t 'https://id.uni-lj.si/DigitalnaIdentiteta/SpremembaGesla' -X POST --data-raw "Form.Username=$1&Form.Password=$s&Form.NewPassword=$n&Form.NewPasswordConfirmation=$n&__RequestVerificationToken=$r" | grep "Uspešno ste spremenili"