We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 48e43c6 commit 3bc1653Copy full SHA for 3bc1653
get_fails.sh
@@ -0,0 +1,10 @@
1
+#!/bin/bash
2
+#grep "failure;" /var/log/secure | awk -F "=" '{print$7}' | awk '{print$1}' | sort | uniq -c | sort -rn > failed_login_ips.txt
3
+#
4
+AUTHLOGS=/var/log/secure
5
+OUTFILE=/root/failed_login_ips.txt
6
7
+get_failed_auths () {
8
+ grep "failure;" $AUTHLOGS | awk -F "=" '{print$7}' | awk '{print$1}' | sort | uniq -c | sort -rn > $OUTFILE
9
+}
10
+get_failed_auths
0 commit comments