SodiumChloride

Shortest (sh.st) bypass script

Sep 4th, 2016
463
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.45 KB | None | 0 0
  1. #!/bin/bash
  2.  
  3. USER_AGENT=""
  4. SHORTEST=$1
  5.  
  6. if [ "$SHORTEST" = "" ]; then
  7.     echo "Usage: shst <link>"
  8.     echo "Will work on any shorte.st link, including shorte.st and sh.st"
  9.     exit 0
  10. fi
  11.  
  12. SHORTEST=$(echo "$SHORTEST" | sed 's~http[s]*://~~g')
  13.  
  14. target_unformatted=$(curl -s --user-agent "$USER_AGENT" $SHORTEST | grep "<title>Redirecting")
  15.  
  16. target=$(echo $target_unformatted | cut -d "<" -f 2 | cut -d ">" -f 2 | cut -c 16-)
  17.  
  18. echo "$SHORTEST -> $target"
Add Comment
Please, Sign In to add comment