Advertisement
Guest User

Untitled

a guest
Jun 19th, 2019
103
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.67 KB | None | 0 0
  1. # Display a list of ip address trying to discover URL to exploit
  2. # Ip address will show up if number of invalid attempts (404 page not found) to guess an URL is greater than 3
  3. # See breakdown below
  4.  
  5. grep /var/log/nginx/access.log -e 404 | \ # look up nginx access log for entry(s)
  6. awk '{print $1}' | \ . # print only ip address from matched entry(s)
  7. sort | \ # sort ip address(es)
  8. uniq -c | \ . # count incidences
  9. sort | \ # re sort new list of incidences
  10. awk '{if ($1 > 3) print $2}' . # finally print ip address where ip address appeared more than 3 times
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement