Advertisement
Guest User

Untitled

a guest
Jul 31st, 2016
65
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.21 KB | None | 0 0
  1. LC_ALL=C awk '$13 ~ /WordPress/ {sub(",","",$1); IP[$1]++}END{for (i in IP) print IP[i],i}' /var/log/httpd/access_logs | sort -rn | head -3
  2.  
  3. 17473 123.123.123.123
  4. 12808 123.123.123.124
  5. 12603 123.123.123.125
  6.  
  7. tail -f /var/log/httpd/access_log | LC_ALL=C awk '$13 ~ /WordPress/ {sub(",","",$1); IP[$1]++}{for (i in IP) print IP[i],i}' | awk '$1 > 20'
  8.  
  9. 101 123.123.123.126
  10. 101 123.123.123.126
  11. 101 123.123.123.126
  12. 101 123.123.123.126
  13. 101 123.123.123.126
  14. 101 123.123.123.126
  15. 101 123.123.123.126
  16. 101 123.123.123.126
  17. 101 123.123.123.126
  18. 101 123.123.123.126
  19. 102 123.123.123.126
  20. 102 123.123.123.126
  21. 102 123.123.123.126
  22. 102 123.123.123.126
  23. 102 123.123.123.126
  24. 102 123.123.123.126
  25. 102 123.123.123.126
  26. 102 123.123.123.126
  27. 103 123.123.123.126
  28. 103 123.123.123.126
  29. 103 123.123.123.126
  30. 103 123.123.123.126
  31.  
  32. 110 123.123.123.126
  33. 103 123.123.123.127
  34.  
  35. 170 123.123.123.126
  36. 146 123.123.123.127
  37.  
  38. for i in {1..20}; do timeout -s INT 1 tail -f /var/log/httpd/eurobits.biz > /dev/shm/TAIL$i; tput cup 1 0 && tput clear && LC_ALL=C awk '$13 ~ /WordPress/ {sub(",","",$1);IP[$1]++}END{for (i in IP) print IP[i],i}' /dev/shm/TAIL* | sort -rn | head -10; sleep .1; done
  39.  
  40. 103 123.123.123.126
  41. 73 123.123.123.127
  42. 66 123.123.123.128
  43. 33 123.123.123.129
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement