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 | |
# Počet výpisu nejvíce spamujících adres, pokud je dodaný argument | |
if [ $# -eq 0 ]; then | |
COUNT=-1 | |
else | |
COUNT=$1 | |
fi | |
# Výpis IP adres, kterým se nepodařilo zadat správné heslo | |
grep "Failed password" /var/log/auth.log | \ # Filtrovat jen ty, co zadali špatně heslo |