Created
February 21, 2022 00:37
-
-
Save greghunt/401adbc07326899343cec463d811b556 to your computer and use it in GitHub Desktop.
Super Simple WordPress Site Test
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 | |
if [[ "$(curl -L -s $1/license.txt | grep -coF WordPress)" -gt 0 ]]; then | |
echo "Is WordPress" | |
else | |
echo "Is NOT WordPress" | |
fi |
Bash Function
iswp() {
if [[ "$(curl -L -s $1/license.txt | grep -coF WordPress)" -gt 0 ]]; then echo true; else echo false; fi
}
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
One-liner:
DOMAIN=wpengine.com && if [[ "$(curl -L -s $DOMAIN/license.txt | grep -coF WordPress)" -gt 0 ]]; then echo true; else echo false; fi