Tag Archives: development

A dashboard for digging through break-in attempts

While I have been between jobs lately (no, not that kind. The good kind where I have been fortunate to get some time to relocate etcetera) I have been hacking a bit on something to visualize and dig through the data of failed login attempts of a blog I run. I send all login attempts that does not come over SSL to a pseudo login page that just logs it, that is the kind of thing I do for fun -what do other people do?

So I have been collecting this data set and I was running some shell scripts on it, but I wanted a dashboard.
Boring story cut short I threw some Bootstrap, jqplot, PHP, a shell script for importing my log and a sqlite3 database at the wall and this is what stuck.

One of the nice things with using Bootstrap is that people are spared from my web design, and also that I get a responsive layout for free.

Lilith dashboard version 0.1

This is where it is at right now, this first version however just gave me a thousand more ideas of features I want to add to it in the future.

It has already given me some interesting insight into the patterns of the -presumedly- bots trying to log in, such as that 72% of the IPs only appear once and that Sunday is by far the most busy day. Another interesting pattern is that most login attempts keep coming in threes from different IPs at almost the same time trying the same combination(see the last section with the last 10 rows from the log).

I plan on making this available as open source, but there is some major cleanup needed first..

Sounds good? Let me know in the comments. I do like feedback, but please keep it above the belt!

Share

Quick script to check if a domain is about to expire

A couple of nights ago I threw together a quick script to be able to do some automatic checks to see if my domains are expiring. The script is full of ugly code but it gets the job done and I can now loop through a list of domains. Example of usage below. Continue reading

Share

Updates to a couple of my FreeNAS scripts

I have updated a couple of the scripts mentioned earlier that I use on FreeNAS. Originally I intended to bundle them together but reconsidered and now feel they are better off available separately. So here is basically a brief of the changes and what would have been a common README.

If there is actually anyone using the script to back up the configuration via email you really should read on and then update to this version! Continue reading

Share

Quick script to poll parcel status

Sometimes when waiting for a package I like to check the status of it now and then (in reality this means every moment I have over – or rediculously often).
I also like to do things on the command line.

Enter small script of the day;
(this relates to Schenker in Sweden)

%cat schenker.sh
#!/bin/sh
if [ "${1}" = "" ] ; then
cat < Continue reading

Share

Script to check for eol on the command line

I have often wanted a way to check if end of life is getting close for my systems on the command line.
The message in freebsd-update is really nice, but it feels a bit overkill to run that just to check if I should consider updating to a new release of FreeBSD -and it also only checks for the system it is run on..

So I hacked up this little script which checks if EoL is close for either the currently running release of FreeBSD or for the one given as an argument. Now I can have a cron job running every now and then to check for all releases I’m using.

Get it here if you want to give it a try.
Continue reading

Share

Setting the $Id$ tag in svn

I keep forgetting this so here is a short memo..

To enable the setting of $Id$ edit your ~/.subversion/config and remove the comment or add
enable-auto-props = yes
under [miscellany]
and
*.php = svn:keywords=Id
under [auto-props]
you can of course add other file types as well, the .php one was just an example.

After this you can run
svn propset svn:keywords Id file.php
to set the value for $Id$ in an existing file. (just remember to add the $Id$ and commit the file..)
Then when you check out the file again you will see somethin similar to this
// $Id: functions.php 22 2010-10-24 12:21:21Z henrik $

There is a lot of other nice things to look at in the subversion config, but this is a good start!

Basically this post keeps me from having to google up pages such as this and go digging in the svn book all the time..
And now I got a chance to share two awesome links as well!

Share