Programming Forums
User Name Password Register
 

RSS Feed
FORUM INDEX | TODAY'S POSTS | UNANSWERED THREADS | ADVANCED SEARCH

 
 
Thread Tools Display Modes
Prev Previous Post in Thread   Next Post in Thread Next
Old Dec 19th, 2007, 3:39 AM   #1
lynxus
Newbie
 
Join Date: Dec 2007
Posts: 4
Rep Power: 0 lynxus is on a distinguished road
Count number of occourences of a IP address in a log file.

Hi guys, i have a log file that normally is many many many IP's in it.
However sometimes i get attacked by a single IP and it slows down the system. The log file shows this IP more than any other.

What i was thinking of was a script that could check teh file, if it has shed loads of the same IP it woudl do something ( mail me ) i can do the mail part, but the actual looking and working with part im stuck on.

Has anyone got any idea how to do the below?

Check file.log to see if an IP is repeated lets say 1000 times or more.
If so then do Blaaaaa. Else do nothing.

I cant get it to look for an IP ie 1.1.1.1 as it changes, so somehow it will need to be able to identify what it looks like?


Any info would be GReeeeeaaaat.

-Graham
lynxus is offline   Reply With Quote
 

Bookmarks

« Previous Thread in Forum | Next Thread in Forum »

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Jumping to a specific line number in a text file Adeil C++ 4 Nov 5th, 2007 9:54 AM
PigLattin Converter, count number of words used in dictionary. MrSmiley Python 2 Oct 17th, 2005 4:47 PM
After execution - Error cannot locate /Skin File? wchar Visual Basic 1 Mar 5th, 2005 9:04 PM
airport Log program using 3D linked List : problem reading from file gemini_shooter C++ 0 Mar 2nd, 2005 4:12 PM
Specific file address... Monkey_features Delphi 0 Feb 8th, 2005 5:05 PM




DaniWeb IT Discussion Community
All times are GMT -5. The time now is 8:50 AM.

Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC