MatthewClarkMay / geoip-attack-map

Cyber security geoip attack map that follows syslog and parses IPs/port numbers to visualize attackers in real time.
Apache License 2.0
353 stars 203 forks source link

toLowerCase() in index.html #6

Open diegodblr opened 7 years ago

diegodblr commented 7 years ago

Has happened to give error in the application when the amount of logs is very great and very fast. I have checked that the java script toLowerCase () function used to put flag images is to blame. I have adopted a simple solution here:

// var path = 'flags /' + args [i] .toLowerCase () + '.png'; Var path = 'flags /' + args [i] + '.png';

I removed toLowerCase () and used a shell script function to rename by capitalizing the acronyms of countries in the flags directory. Resolved for me.

MatthewClarkMay commented 7 years ago

Thanks for looking into this Diego! I'll commit the changes tonight.

amassi-network commented 7 years ago

hello

for file in ; do mv -- "$file" "${file^^}" ; done for f in .PNG; do mv -- "$f" "${f%.PNG}.png"; done

But if you have a very large log it s crash again

diegodblr commented 7 years ago

With me there is no crash, but the application needs adjustments to work for more than 24 hours and when there is logging through logrotate. I still need to kill the DataServer.py application, start a new instance of DataServer.py and do a reload in the browser.

amassi-network commented 7 years ago

Effectively logrotate make a crash of Data Server.py. I plan to debug this problem. I think you have to catch the exeception and wait for the generation of new lines in DataServer.py

MatthewClarkMay commented 7 years ago

I've never used Logrotate with this project myself. Tonight I will try reproducing the exception, and work on debugging it.