Skip to content

Instantly share code, notes, and snippets.

@andru255
Last active November 24, 2018 18:47
Show Gist options
  • Save andru255/89588a2bdca03a9da99021c126f8423c to your computer and use it in GitHub Desktop.
Save andru255/89588a2bdca03a9da99021c126f8423c to your computer and use it in GitHub Desktop.
basicAuthGenerator.sh

BasicAuthGenerator.sh corre en linux/iOS

Descargar y luego habilitarles permisos de ejecución:

~ sudo chmod +x basicAuthGenerator.sh

~ ./basicAuthGenerator.sh nombre password
#!/bin/sh
username=$1
password=$2
credentials="$(echo -n "$username:$password" | base64)"
header="Basic $credentials"
echo "Agregar en la cabecera con el keyword: Authorization"
echo "luego ingresar el valor:"
echo $header
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment