This page contains source code and documentation for some of the programming projects on which I've worked.

CIDR IP lister

This CGI script takes an address in CIDR notation (e.g and lists all the IP addresses in that block. Someone at work needed a tool to do it, so I wrote one. It won't do anything over a /16 in size, because I don't have the bandwidth or CPU time for anything bigger (asking for a /16 will give you a page that's about a megabyte in size).


lognews is a program to collect Usenet articles from an NNTP server and log them to an SQL database. The SQL to create the database is also included in the package.

To make it work, you'll need Python, MySQL and MySQL-python installed. Any reasonably recent versions should work.

It is still a work in progress, and most certainly isn't suitable for production servers. At present, it lacks a front end, so you would need to write your own scripts in order to extract and display the data from the database. It's also too slow to keep up with a full Usenet feed, which is because of network latency (it needs to send lots of SQL queries and NNTP commands across the network, and waiting for the replies takes time). This second problem would probably go away if the NNTP server, database server and logging server were all on the same LAN (or all three services were running on the same machine), but it would be better to rewrite the program to perform fewer transactions over the network.

Also, this was written before I'd heard of SQL injection attacks, so the Python code for logging the news articles should probably not be used by anyone, ever.

The database design was quite nice, though.

Everything else

Some other little bits and pieces of possibly-usefulness: