Advertisement
Guest User

Untitled

a guest
Feb 10th, 2014
475
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.49 KB | None | 0 0
  1. 172.17.100.37 172.17.100.45 172.17.222.158
  2.  
  3. 172.17.100.37
  4. 172.17.100.45
  5. 172.17.222.158
  6.  
  7. cmd = "grep -o '^[0-9]{1,3}.[0-9]{1,3}.[0-9]{1,3}.[0-9]{1,3}' /var/log/apache2/access.log | sort | uniq "
  8.  
  9. 172.17.222.158 - - [30/Jan/2014:09:33:11 +0000] "GET /cgi-bin/right.cgi HTTP/1.1" 204 219 "http://172.17.223.72/index2.html?fname=172.17.223.75" "Mozilla/5.$
  10. 172.17.222.158 - - [30/Jan/2014:09:33:11 +0000] "GET /cgi-bin/stop.cgi HTTP/1.1" 204 218 "http://172.17.223.72/index2.html?fname=172.17.223.75" "Mozilla/5.0$
  11. 172.17.222.158 - - [30/Jan/2014:09:33:12 +0000] "GET /cgi-bin/right.cgi HTTP/1.1" 204 218 "http://172.17.223.72/index2.html?fname=172.17.223.75" "Mozilla/5.$
  12. 172.17.222.158 - - [30/Jan/2014:09:33:12 +0000] "GET /cgi-bin/stop.cgi HTTP/1.1" 204
  13.  
  14. echo "172.17.100.37 172.17.100.45 172.17.222.158" | tr ' ' 'n'
  15. 172.17.100.37
  16. 172.17.100.45
  17. 172.17.222.158
  18.  
  19. cat file
  20. 172.17.222.158 - - [30/Jan/2014:09:33:11 +0000] "GET /cgi-bin/right.cgi HTTP/1.1" 204 219 "http://172.17.223.72/index2.html?fname=172.17.223.75" "Mozilla/5.$
  21. 172.17.222.158 - - [30/Jan/2014:09:33:11 +0000] "GET /cgi-bin/stop.cgi HTTP/1.1" 204 218 "http://172.17.223.72/index2.html?fname=172.17.223.75" "Mozilla/5.0$
  22. 172.17.222.158 - - [30/Jan/2014:09:33:12 +0000] "GET /cgi-bin/right.cgi HTTP/1.1" 204 218 "http://172.17.223.72/index2.html?fname=172.17.223.75" "Mozilla/5.$
  23. 172.17.222.158 - - [30/Jan/2014:09:33:12 +0000] "GET /cgi-bin/stop.cgi HTTP/1.1" 204
  24.  
  25. awk -F/ '{print $8}' file
  26. 172.17.223.72
  27. 172.17.223.72
  28. 172.17.223.72
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement