Skip to content

Instantly share code, notes, and snippets.

@heywoodlh
Created May 8, 2017 00:57
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save heywoodlh/a48895a4248d55a004408e651bdd5110 to your computer and use it in GitHub Desktop.
Save heywoodlh/a48895a4248d55a004408e651bdd5110 to your computer and use it in GitHub Desktop.
Simple bash script that logs user into desired website
#!/usr/bin/env bash
help_message() {
echo "Usage: $0 'username' 'password' 'https://urltologin.com'"
}
if [ -z $1 ]
then
help_message
exit 2
fi
if [ -z $2 ]
then
help_message
exit 2
fi
if [ -z $3 ]
then
help_message
exit 2
fi
curl --user "$1":"$2" "$3" -v
exit 0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment