Last active
August 29, 2015 14:04
-
-
Save xhip/96f85ecc588793a5baf9 to your computer and use it in GitHub Desktop.
Prntscr bypass
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# ---------------------------------- | |
# Prntscr.sh - Get image link only | |
# ---------------------------------- | |
URL="$1" | |
if [ $(echo "$URL" | grep -E "^http:\/\/prntscr.com\/[0-9a-zA-Z]{6}$") ]; then | |
CODE=$(curl -sf "$URL" | head -n 1 | sed -e 's/.*<meta name="twitter:image:src" content="\([^"]*\)".*/\1/') | |
echo "prntscr: $CODE" | |
else | |
echo "Invalid Link! | Usage: .p <http://prntscr.com/XXXXXX>" | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment