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