Created
June 13, 2019 18:06
-
-
Save klebermagno/77feca6d82caceae46eb626f8b8e55cc to your computer and use it in GitHub Desktop.
bin
This file contains 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/sh | |
docker exec -it $1 bash |
This file contains 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/bash | |
function jsonval { | |
temp=`echo $json | sed 's/\\\\\//\//g' | sed 's/[{}]//g' | awk -v k="text" '{n=split($0,a,","); for (i=1; i<=n; i++) print a[i]}' | sed 's/\"\:\"/\|/g' | sed 's/[\,]/ /g' | sed 's/\"//g' | grep -w $prop` | |
echo ${temp##*|} | |
} | |
json=`curl http://hosting-033.fiesc.com.br/api/authenticate \ | |
-s -XPOST \ | |
-H 'Content-Type: application/json' \ | |
-H 'Origin: http://hosting-033.fiesc.com.br' \ | |
-H 'Content-Length: 39' \ | |
-H 'Host: hosting-033.fiesc.com.br' \ | |
-H 'Referer: http://hosting-033.fiesc.com.br/' \ | |
-H 'Connection: keep-alive' \ | |
--data-binary '{"username":"admin","password":"admin"}' ` | |
#echo $json | |
prop='id_token' | |
picurl=`jsonval` | |
echo "" $picurl |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment