Michael Pilosov
2 years ago
7 changed files with 48 additions and 4 deletions
@ -0,0 +1,16 @@ |
|||
#!/bin/bash |
|||
|
|||
if [ "$#" -ne 2 ]; then |
|||
echo "Usage: ./login_user.sh <username> <password>" |
|||
exit 1 |
|||
fi |
|||
|
|||
USERNAME="$1" |
|||
PASSWORD="$2" |
|||
|
|||
curl -X POST \ |
|||
-H "Content-Type: application/x-www-form-urlencoded" \ |
|||
-c cookies.txt \ |
|||
-d "username=${USERNAME}&password=${PASSWORD}" \ |
|||
http://localhost:5000/login |
|||
|
@ -0,0 +1,16 @@ |
|||
#!/bin/bash |
|||
|
|||
if [ "$#" -ne 2 ]; then |
|||
echo "Usage: ./signup_user.sh <username> <password>" |
|||
exit 1 |
|||
fi |
|||
|
|||
USERNAME="$1" |
|||
PASSWORD="$2" |
|||
|
|||
curl -X POST \ |
|||
-H "Content-Type: application/x-www-form-urlencoded" \ |
|||
-c cookies.txt \ |
|||
-d "username=${USERNAME}&password=${PASSWORD}" \ |
|||
http://localhost:5000/signup |
|||
|
Loading…
Reference in new issue