Posted January 3Jan 3 Write a program that reads a server log file and analyzes it to provide the following information: The total number of requests. The top 5 IP addresses making requests. The most requested resource (URL). The number of 4xx and 5xx error codes encountered. Bonus: Add a feature to identify failed login attempts by looking for specific patterns like "login failed" or "authentication error." Allow the user to input the path to the log file. Example Output: Total Requests: 12,345 Top 5 IPs: 1. 192.168.1.1 - 1,234 requests 2. 10.0.0.5 - 987 requests ... Most Requested Resource: /index.html 4xx Errors: 456 5xx Errors: 123 CodeName: Jessica 💻 Linux Enthusiast | 🌍 Adventurer | 🦄 Unicorn 🌐 My Site | 📢 Join the Forum
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now