r00t.gr

Programming and more

Entries for the ‘Uncategorized’ Category

The life of the software developer in 7 minutes

If you are a software developer, you will cry after you see this!  

How to filter a string and keep only numbers with java

Just run this code:   str = str.replaceAll("[^0-9]+","");str = str.replaceAll("[^0-9]+",""); This means: replace everything that is not number with empty string (“”)

Ban ip with iptables plus bash script

To ban an ip with iptables: iptables -A INPUT -s 195.195.195.195 -j DROP service iptables save service iptables restartiptables -A INPUT -s 195.195.195.195 -j DROP service iptables save service iptables restart if you want to do that with bash here is a simple script that asks you for theip to ban then bans it: iptables […]