Last active
December 9, 2021 15:31
-
-
Save greg-randall/d6b5d7fc826832d1d3d300d23b9966c9 to your computer and use it in GitHub Desktop.
Scans a list of domains for their WordPress version and outputs a CSV.
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
| FILENAME="domains.txt" | |
| LINES=$(cat $FILENAME) | |
| echo "Domain, Version" > domains_with_versions.csv | |
| for LINE in $LINES | |
| do | |
| CHECKLOCATION="${LINE}/feed/" | |
| VERSION=` curl -s $CHECKLOCATION | grep -i "<generator>" | grep -E "\d+\.\d+\.\d+" --only-matching ` | |
| echo "$LINE, $VERSION" | |
| echo "$LINE, $VERSION" >> domains_with_versions.csv | |
| done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment