Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- USER_AGENT=""
- SHORTEST=$1
- if [ "$SHORTEST" = "" ]; then
- echo "Usage: shst <link>"
- echo "Will work on any shorte.st link, including shorte.st and sh.st"
- exit 0
- fi
- SHORTEST=$(echo "$SHORTEST" | sed 's~http[s]*://~~g')
- target_unformatted=$(curl -s --user-agent "$USER_AGENT" $SHORTEST | grep "<title>Redirecting")
- target=$(echo $target_unformatted | cut -d "<" -f 2 | cut -d ">" -f 2 | cut -c 16-)
- echo "$SHORTEST -> $target"
Add Comment
Please, Sign In to add comment