curl / Mailing Lists / curl-users / Single Mail


Authentication fails on a specific website

From: SATRIANI Santana <>
Date: Sat, 2 Feb 2019 11:33:02 +0000

Authentication fails on a
I found out that you only need the valid BUNSESSION2 to work with the website.
Unfortunately every attempt to get the valid BUNSESSION2 through authentication fails.
Here is a part of my code:

_reqjson="{ \
\"loginUsername\": \"${user}\", \
\"loginPassword\": \"${pass}\" \

get_cookie=$(curl \
--header "User-Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/71.0.3578.98 Safari/537.36" \
--data-binary "$_reqjson" \
--header "Connection: keep-alive" "" \
-v -L 2>&1)

eval $(echo ${get_cookie} | grep -o -P 'BUNSESSION2=.*?;' | sed 's/.$//')
Thanks for any advice

Received on 2019-02-02