Posts Tagged ‘bofh’

Web Watchdog

Published November 28th, 2007, updated March 7th, 2008.

The Web Watchdog notifies you when a website gets updated. Instead of continuously returning to blogs, forums or discussion boards, you can ask the Web Watchdog to do this for you.

Web Watchdog, Bookmarklet

use service
download source code

Ipmap

Published October 17th, 2007, updated April 10th, 2008.

Ipmap is a GTK-based IP address grapher, inspired by an XKCD comic and glTail. It reads data from standard input and maps IP/size pairs on a grid (see the screenshot). Due to this simple interface, it is easy to create filters for a variety of data sources. The program comes along with some example filters, including tcpdump ouput, Apache/ProFTPd’s access logs and Squid logs.

download source code

Squid LDAP Authentication

Published May 9th, 2007, updated February 29th, 2008.

This is a proposed patch for squid_auth_ldap, the authentication helper of the Squid Cache. It increases the maximum filter length to 32k and thus, enables long search filters. Wow:-)

# patch for squid-2.6.STABLE11, enables long search filters
# author: Benjamin Schweizer 
# diff -r squid-2.6.STABLE11/helpers/basic_auth/LDAP/squid_ldap_auth.c \
  squid-2.6.STABLE11-sickos/helpers/basic_auth/LDAP/squid_ldap_auth.c
32a33,34
>  * 2007-05-09: Benjamin Schweizer 
>  *             - Increased buffer size to support long search filters.
343c345
< char buf[256];
---
>     char buf[32768];
566c568
< while (fgets(buf, 256, stdin) != NULL) {
---
>     while (fgets(buf, sizeof(buf), stdin) != NULL) {
653c655
< char filter[256];
---
> 	char filter[32768];

download source code

As of Aug 27, 2007, this patch is included in the cvs tree.

GnuDIP/MiniDIP Password Encryption

Published January 18th, 2007, updated February 29th, 2008.

This is a patch for GnuDIP’s minidip server. It switches the password storage format from plain text to md5 hashes, so you can copy passwords from GnuDIP to MiniDIP and vice versa. Furthermore, this allows you to use arbitrary characters in your passwords without breaking the format of the config files. Use GnuDIP’s encpass utility to encrypt passwords.

# patch for gnudip-2.3.5, changes auth database to md5
# author: Benjamin Schweizer 
# diff -r gnudip-2.3.5/gnudip/sbin/minidip.pl \
  gnudip-2.3.5bs/gnudip/sbin/minidip.pl
185c185,187
< $checkpass = md5_hex(md5_hex($checkpass) . '.' . $salt)
---
> # 2007-01-18, schweizer: storing passwords md5 hashed (as in gnudip/mysql)
> #$checkpass = md5_hex(md5_hex($checkpass) . '.' . $salt)
> $checkpass = md5_hex($checkpass . '.' . $salt)

download source code

Squid Efficiency Plugin for Munin

Published November 16th, 2006, updated November 25th, 2009.

This is a plugin for the Munin monitoring system. It graphs the cache efficiency of your Squid proxy servers and shows nice graphs for average byte and request hits.

download source code

2009-11-17: there’s an updated version available with support for squid3
2009-11-25: here’s another update, volker added clean config settings

Kerio Mailserver Storage Format

Published October 12th, 2005, updated February 10th, 2008.

Here are some notes on the Kerio Mailserver, version 6.1. My interest lays on the storage as I’m going to do some data injection :-)

kerio/$ ls

store/mail/domain.tld/username/ - that's it. see below.
store/mail/domain.tld/#public/ - shared user?
store/logs/ - ascii text log files and index for each of them
store/queue/nn/* - hashes or maildir or somewhat?
store/queue/pickup/ - working directory?
store/spamassassin/* - uninteresting
store/tmp/* - not interesting

kerio/store/mail/domain.tld/username/$ ls

Calendar - Calendar data, vcal + index
Contacts - Contacts, vcard + index
Deleted Items - All types + index
Drafts - mail?
INBOX - mail?
Junk E-mail - mail?
Sent Items - mail?
Tasks - unknown
filter.siv - mail filters, perl-like syntax
folder.map - shared folders mapping, simple xml
settings.usr - serialized php structure
stats.usr - unknown
sub.fld - optional (mail) folders

kerio/store/mail/domain.tld/username/Folder/$ ls

#assoc/ - unknown
#msgs/*.eml - VCALENDAR, VCARD, Mail, whatever
subfolders/ - like Folder, unsure where they are linked
deleted.fld - ??? unix timestamp + filename
index.fld - see below.
properties.fld - unknown
search.fld - sqlite2 database, somewhat broken; useless (or other format???)
sort.fld - unknown, may be cache
status.fld - unknown

kerio/store/mail/domain.tld/username/Folder/$ cat index.fld

U00000001 F80000001 S1133 D43032abf M4305f1b7 I0001 CIPM.Appointment

Format:
Unnnnnnnn = file name (#msg/nnnnnnnn.eml)
Fnnnnnnnn = unknown (assuming signed int, always? -2^31+1)
Snnnn = unknown
Dnnnnnnnn = create date (hex encoded unix timestamp)
Mnnnnnnnn = modify date (hex encoded unix timestamp)
Innnn = incremental counter
CIPM.* = file type
… = optional data behind

kerio/store/mail/domain.tld/username/Folder/$ cat deleted.fld

431d8fa3 00000005

Format:
timestamp (hex encoded) + filename

kerio/store/mail/domain.tld/username/Folder/$ cat status.fld

T2
G64590354-03bc-46fa-9d94-b5c19be217d7
V430adb2c
U0000000c
C00000001
M6
D0
R0
N0
S7514
Auser@domain.tld lrswicda

Format:
T – unknown
G – unique id, probably used to identify folder
V – timestamp, folder create date
U – next filename to use
C – counter?
M – folder type?
D – unknown, some delete flag?
R – unknown
N – unknown
S – unknown
A – mail address / user id + permissions?

That’s all. May be it helps you to tinker with the backend.

Windows Serial Console Daemon

Published May 11th, 2003, updated February 29th, 2008.

wconsd is a serial console server for Windows NT/2k/XP. It maps local com ports to an IP socket and makes it accessible with any TCP/IP terminal. I use it with PuTTY to set up routers when no IP address is assigned… PuTTY just feels better than Hyperterminal or TeraTerm;)

downlad source code
downlad binaries

update: PuTTY 0.59 (Jan 24, 2007) includes native support for serial consoles.