I have a python script that logs me in to a service. I do:
./login.py [email protected] 'pass'
in order to log in.
When I enter this command directly I successfully login. When I run the following script server returns 400.
PYAPIROOT="scriptpath/script"
PYLOGIN="./login.py"
LOGIN="[email protected]"
PASS="'pass'"
function login {
echo -----------------------------
echo
cd $PYAPIROOT
echo "Logging in "$LOGIN
python "$PYLOGIN" "$LOGIN" "$PASS"
echo $PYLOGIN $LOGIN $PASS
echo -----------------------------
}
login
When I copy and run what is echo'ed I get 200. Why can't I log in using my script?