From a18272ac230453853ea147829640f05e1255304c Mon Sep 17 00:00:00 2001 From: Manuel Friedli Date: Tue, 23 Jun 2020 02:16:37 +0200 Subject: [PATCH] update ddos-mitigator.sh --- ddos-mitigator/ddos-mitigator.sh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/ddos-mitigator/ddos-mitigator.sh b/ddos-mitigator/ddos-mitigator.sh index ff13568..dfbc0f9 100755 --- a/ddos-mitigator/ddos-mitigator.sh +++ b/ddos-mitigator/ddos-mitigator.sh @@ -1,7 +1,7 @@ #!/bin/sh input_files=/var/log/apache2/access_*.log -date="14/Jun/2020:18:" +date="20/Jun/2020:18" tmpdir=$(mktemp -d) cd "${tmpdir}" @@ -19,3 +19,6 @@ cut -d. -f1 raw-ipv4.txt | sort | uniq -c | sort -n > sorted-ipv4-8.txt chmod o+rx "${tmpdir}" echo "Have fun in ${tmpdir}!" + +grep -E '^ *[0-9]{4,5} ' "${tmpdir}/sorted-ipv4-32.txt" |tr -s '[:blank:]' | cut -d' ' -f3 + \ No newline at end of file