Skip to content

Commit 8a4a0df

Browse files
authored
Import
From `Autodesk/pull/224`
1 parent 58236f5 commit 8a4a0df

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed

updater/scripts/failed-auth.sh

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
#!/bin/bash
2+
3+
#
4+
# List failed authentication attempts
5+
#
6+
7+
echo -e "user\tcount"
8+
9+
zcat -f /var/log/github/auth.log.1* |
10+
grep -hF 'at=failure' |
11+
grep -vF 'raw_login=nil' |
12+
grep -oP ' login=.+?(?=raw_login)' |
13+
grep -v 'https' |
14+
grep -vF 'login=nil' |
15+
grep -vF 'login=api' |
16+
grep -vF 'login=git' |
17+
perl -lape 's/login=//' |
18+
sort |
19+
uniq -ic |
20+
sort -rn |
21+
awk '{printf("%s\t%s\n",$2,$1)}'

0 commit comments

Comments
 (0)