add http-lister.sh
This commit is contained in:
parent
172a8a92a4
commit
e84381825b
1 changed files with 13 additions and 0 deletions
13
ddos-mitigator/http-lister.sh
Executable file
13
ddos-mitigator/http-lister.sh
Executable file
|
@ -0,0 +1,13 @@
|
||||||
|
#!/bin/sh
|
||||||
|
input_files=/var/log/apache2/access_*.log
|
||||||
|
tmpdir=$(mktemp -d)
|
||||||
|
|
||||||
|
cd "${tmpdir}"
|
||||||
|
netstat -nat |grep 94.199.214.20:443|tr -s '[:blank:]'|cut -d' ' -f5|cut -d: -f1 | sort > raw-http.txt
|
||||||
|
|
||||||
|
uniq -c raw-http.txt | sort -n > sorted-http.txt
|
||||||
|
cut -d. -f1-3 raw-http.txt | sort | uniq -c | sort -n > sorted-http-24.txt
|
||||||
|
cut -d. -f1-2 raw-http.txt | sort | uniq -c | sort -n > sorted-http-16.txt
|
||||||
|
cut -d. -f1 raw-http.txt | sort | uniq -c | sort -n > sorted-http-8.txt
|
||||||
|
|
||||||
|
echo "Have fun in ${tmpdir}!"
|
Loading…
Reference in a new issue