Created
June 16, 2016 13:33
-
-
Save deadbok/5ac8645383440902fd699c911326a144 to your computer and use it in GitHub Desktop.
This file contains hidden or 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/sh | |
# | |
# Try to dertermine if a site is driven by WordPress | |
# | |
# 2016 by Martin Bo Kristensen Grønholdt | |
echo -n "" > $2 | |
while read url | |
do | |
curl -s ${url} > index.tmp | |
#Test for "Wordpress" on the index page | |
if grep "WordPress" index.tmp > /dev/null | |
then | |
echo "${url}" >> $2 | |
echo "WordPress: ${url}" | |
else | |
#Test for "Divi" on the index page | |
if grep "Divi" index.tmp > /dev/null | |
then | |
echo "${url}" >> $2 | |
echo "Divi: ${url}" | |
else | |
#Test for wp-core-ui css on the Worpress Login page | |
curl -s -L ${url}/wp-admin > index.tmp | |
if grep "wp-core-ui" index.tmp > /dev/null | |
then | |
echo "${url}" >> $2 | |
echo "WordPress login: ${url}" | |
else | |
echo "Unknown: ${url}" | |
fi | |
fi | |
fi | |
done < $1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment