Question
[Java] Write a program that analyzes a web server's log file to determine which computers have attempted to access that web server the most. The
[Java] Write a program that analyzes a web server's log file to determine which computers have attempted to access that web server the most. The user will choose which log file to open. The program should list the total of unique IP address and the top 3 IP address that visited the web server. Look at required output below.
medium.log:
[Mon May 09 01:51:13 2011] [error] [client 207.182.98.19] File does not exist: C:/site/example.com/phpMyAdmin-2.8.1 [Mon May 09 01:51:13 2011] [error] [client 207.182.98.19] File does not exist: C:/site/example.com/phpMyAdmin-2.8.2 [Mon May 09 01:51:13 2011] [error] [client 207.182.98.19] script 'C:/site/hancockfaculty.com/bye.php' not found or unable to start [Mon May 09 01:51:13 2011] [error] [client 207.182.98.19] script 'C:/site/hancockfaculty.com/bye.php' not found or unable to start
Standard Input | Files in the same directory |
---|---|
small.log |
|
Required ouput:
Enter a log file to be analyzed Found 11 unique IP addresses. The most suspicious are: 209.129.94.61 (10 erroneous accesses) 207.42.179.85 (4 erroneous accesses) 75.128.10.211 (3 erroneous accesses)
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started