summaryrefslogtreecommitdiffstats
path: root/skripti/spremeni_geslo_ul.sh
diff options
context:
space:
mode:
authorAnton Luka Šijanec <anton@sijanec.eu>2023-09-25 22:40:55 +0200
committerAnton Luka Šijanec <anton@sijanec.eu>2023-09-25 22:40:55 +0200
commit9dd16c5441808b829a4775ed71b308a1bc474e9f (patch)
treeef78585fc0e29d8a2789ac991d82e135dda7d57a /skripti/spremeni_geslo_ul.sh
parentumask (diff)
downloadr-9dd16c5441808b829a4775ed71b308a1bc474e9f.tar
r-9dd16c5441808b829a4775ed71b308a1bc474e9f.tar.gz
r-9dd16c5441808b829a4775ed71b308a1bc474e9f.tar.bz2
r-9dd16c5441808b829a4775ed71b308a1bc474e9f.tar.lz
r-9dd16c5441808b829a4775ed71b308a1bc474e9f.tar.xz
r-9dd16c5441808b829a4775ed71b308a1bc474e9f.tar.zst
r-9dd16c5441808b829a4775ed71b308a1bc474e9f.zip
Diffstat (limited to '')
-rwxr-xr-xskripti/spremeni_geslo_ul.sh9
1 files changed, 4 insertions, 5 deletions
diff --git a/skripti/spremeni_geslo_ul.sh b/skripti/spremeni_geslo_ul.sh
index 533bba5..acd5c8c 100755
--- a/skripti/spremeni_geslo_ul.sh
+++ b/skripti/spremeni_geslo_ul.sh
@@ -1,12 +1,11 @@
#!/bin/bash
set -xe
-echo vpiši trenutno geslo
-read s
-echo vpiši novo geslo
-read n
+read -p "uporabniško ime (jn1234@student.uni-lj.si): " u
+read -p "trenutno geslo: " s
+read -p "novo geslo: " n
p=`rev <<<$0 | cut -d/ -f1 | rev`
umask 0077
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"
+curl --cookie $t --cookie-jar $t 'https://id.uni-lj.si/DigitalnaIdentiteta/SpremembaGesla' -X POST --data-raw "Form.Username=$u&Form.Password=$s&Form.NewPassword=$n&Form.NewPasswordConfirmation=$n&__RequestVerificationToken=$r" | grep "Uspešno ste spremenili"