diff options
Diffstat (limited to 'openbsd')
| -rwxr-xr-x | openbsd/frontends/scripts/sitestats.sh | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/openbsd/frontends/scripts/sitestats.sh b/openbsd/frontends/scripts/sitestats.sh index 1cd60c6..8a8a31b 100755 --- a/openbsd/frontends/scripts/sitestats.sh +++ b/openbsd/frontends/scripts/sitestats.sh @@ -38,8 +38,8 @@ filter () { # 1. You visit 2 sites within one single second # 2. You try to call an odd file or path cut -d, -f2,3,6,7 $STATSFILE | - perl -l -n -e '$s{$_}++ if /\.suffix/; - $s{$_}+=1000 if /(?:\.php|\.env|robots\.txt|\/wp|\/wordpress\/|\/\.git\/|HNAP)/; + perl -l -n -e '($k)=m/(.*?,.*?,.*?),/; $s{$k}++ if /\.suffix/; + $s{$k}+=1000 if /(?:\.php|\.env|robots\.txt|\/wp|\/wordpress\/|\/\.git\/|HNAP)/; END { while (($k,$v) = each %s) { print $k =~ /.*?,(.*?),/ if $v > 1 } }' | sort -u > $BOTSFILE grep -F -v -f $BOTSFILE $STATSFILE > $STATSFILE.clean |
