3

O great devs that know grep I have a log that I took from a local company's router that got DOSsed yesterday (they sell very nice sandwiches) and I wanted to know how I can take only the IP's from the log so that I can take action against the users (contacting the abuse if the ISP)

Comments
  • 1
    I could help you out if you are willing to share (a part of) the log
  • 2
    Is stackoverflow down?
  • 1
    Try this:

    cat "path/to/logfile" | grep -e "[0-9]\{0,3\}\\.[0-9]\{0,3\}\\.[0-9]\{0,3\}\\.[0-9]\{0,3\}" -o
  • 0
    @darksideplease my SO-fu is not good enough yet
  • 0
    @ChappIO here is the log and thanks i never used grep but i know it works the best for this
    http://pastebin.com/SBh7NMDP
  • 0
    @inpothet The command I posted seems to work and grabs all ip addresses. However, I don't know if that is exactly waht you're looking for
  • 0
    @ChappIO yes now I just filter the local IP out. Thanks for the help
  • 4
    Don't even try. The machines will be hacked ones. The only one you will find are users who do to know about their computer's shady second life
  • 1
    @Kimmax only thing I wanted to do is to contact the ISP as I got notice that this was happening Al over the Netherlands yesterday and people are speculating it was the Turks due to the bad situation between our countries
  • 0
    @Kimmax but I get what you mean and yes I think that is all wat will happen
Add Comment