Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/jonathas/top10ips
:computer: Reading an Apache log file and parsing the 10 most repeated IP addresses. Developed in C++, C#, Groovy, Java, JavaScript, Lua, Perl, PHP, Python and Ruby
https://github.com/jonathas/top10ips
apache cpp csharp groovy java javascript logfile lua perl php python ruby
Last synced: 10 days ago
JSON representation
:computer: Reading an Apache log file and parsing the 10 most repeated IP addresses. Developed in C++, C#, Groovy, Java, JavaScript, Lua, Perl, PHP, Python and Ruby
- Host: GitHub
- URL: https://github.com/jonathas/top10ips
- Owner: jonathas
- License: gpl-3.0
- Created: 2015-01-25T13:56:32.000Z (about 10 years ago)
- Default Branch: master
- Last Pushed: 2015-01-25T14:34:03.000Z (about 10 years ago)
- Last Synced: 2024-11-16T06:28:26.779Z (2 months ago)
- Topics: apache, cpp, csharp, groovy, java, javascript, logfile, lua, perl, php, python, ruby
- Language: Java
- Homepage:
- Size: 383 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Top10IPs
This software enables you to read an Apache log file, showing you it's TOP 10 most repeated IP addresses.
I've had this idea after being on an interview for a Software Engineer position at Google.
The interviewer gave me a format example:1233454356\tGET /index.html\t10.10.10.1\n.
123345343\tGET /index.html\t10.10.10.1\n.
123345435\tGET /index.html\t10.10.12.1\n.And asked me to write an algorithm on Google Docs shared with him (while he would give me a very short time and be watching me real time on Hangouts) to read that file and output it's top 10 ip addresses in the following format:
RANKIPCOUNT
110.10.10.12
210.10.12.11Though that would have been easy to develop, things didn't go as expected at the time for me, as I wasn't able to think normally the way I usually do.
I told them I strongly disagree with that interview format, and they'd be missing some good people with that, as I've also heard that many people who have been through that have experienced the same as me.
Then, as they thought I wasn't able to develop that, I decided to develop the code for that in 10 different languages and reading from a real log file I got from a random day.