logo

utils

~/.local/bin tools and git-hooks git clone https://hacktivis.me/git/utils.git

webfinger.sh (302B)


  1. #!/bin/sh
  2. acct="$1"
  3. accept_header='Accept: application/json,application/xml'
  4. die() {
  5. echo $@
  6. exit 1
  7. }
  8. if [[ -z "${acct}" ]]
  9. then
  10. die "Usage: ${0} [webfinger acct]"
  11. fi
  12. host=$(cut -f2 -d'@' <<<"${acct}")
  13. curl -sSL -H "${accept_header}" "http://${host}/.well-known/webfinger?resource=acct:${acct}"