Report inadequate content

Bash, Shell in Harecoded


Finding abusers. List of most frequent IPs in Apache log

Internet is full of malware and people with leisure time who will hammer your server with no good intentions, most of them will try to access well-known URLs looking for exploits of software like Wordpress (/wp-admin.php, /edit, etc...).

If you monitor for a while your access_log it's easy to find out unwanted behaviour. If you want to get a list of the most frequent IPs in...


Converting a CSV to SQL using 1 line in bash

The command line is very powerful and can do amazing stuff in one single line by pipelining a series of commands. This post is inspired after creating a line that mixed sed and awk, but with just only awk I'll show you an example on how to convert a CSV file to an SQL insert

Let's take an input CSV named events-2013-06-06.csv with 16 columns per line. It looks like...