source: spip-zone/_dev_/top10/scanner.sh @ 9930

Last change on this file since 9930 was 9930, checked in by fil@…, 12 years ago

un scanner des sites sous spip, pour savoir quels sont les plugins les plus employes, les sites morts etc

File size: 538 bytes
Line 
1#! /bin/sh
2
3TMP=/tmp/top10
4
5mkdir $TMP
6
7curl "http://www.spip.net/?page=sites-sous-spip-par-date">$TMP/sites-sous-spip.txt 2>/dev/null
8
9for i in $(cut -d"      " -f2 $TMP/sites-sous-spip.txt); do
10        echo "--- "$i" ---"
11        rm -f $TMP/headers
12        curl -m 30 -D $TMP/headers --location --include \
13                $i >$TMP/body 2>&1
14        if [ -f $TMP/headers ]; then
15                grep "Location:" $TMP/headers;
16                grep "Composed-By:" $TMP/headers;
17                grep "404 Not Found" $TMP/headers;
18                grep -ci "spip" $TMP/body
19                grep -ci "spip.net" $TMP/body
20        else
21                echo "! injoignable"
22        fi
23done
Note: See TracBrowser for help on using the repository browser.