Posts Tagged ‘programming’

Programming without purpose, Image dithering and a CDP Transponder

Friday, June 19th, 2009

Dithered image comparison

Inspired by a forum post on osdev.org about image colour downsampling I decided to have a crack at writing a program which could take a 24-bit image and convert it down to any lesser image format. The picture above shows an image split down the middle. On the right is the original 24-bit colour version and on the left is a 8-bit per pixel version with 2 bits for the red colour channel and 3 bits for the green and blue colour channels (rather than having a specific palette for the image I am downsampling to a 2:3:3 bpp image). As you can see the colour loss is acceptable and despit the limitations it still looks nice. Obviously the image could be improved further by choosing a colour palette suitable for the image but that is for another project.

I’ll post the code once I have cleaned it up a bit and smoothed it out so it doesn’t have so many hard coded values.

CDP Transponder

Another project I’ve been working on with my interest in Cisco hacking and reverse engineering is my Cisco Discovery Protocol transponder. It is a small program which sits on your computer and emits a configured CDP message every so often allowing your computer to show up on CDP neighbour lists. It doesn’t really have much purpose at the moment but I hope to play around with it and trying to bridge it with LLDP devices so I can get old Cisco gear to show up on my new Windows network topology maps.

show cdp neighbors

This is the output of the show cdp neighbors command on my Cisco 2610XM router. It shows my computer as the device connected to the Fastethernet 0/0 port.

UnHexDump released

Saturday, June 13th, 2009

unhexdump

UnHexDump takes the familiar output of HexDump and converts it back into nice binary format. I wrote this program to assist in extracting files off my Cisco 7970 IP phone which lacks any remote file copying capability.

I am now releasing UnHexDump to the world. It’s a little hackish (given that I wrote it at 3am this morning to solve a problem, that usually happens :[ ). It is licensed under the GNU GPLv3 License. The source code is plain C++ and a windows executable are to be found in the zip file below.

It can be found by clicking the UnHexDump link on the sidebar or here.

Work in progress, Cisco XML services

Friday, June 12th, 2009

Recently I was inspired by a thread on the Whirlpool forums to write XML services for the Cisco IP phones I have. What I have created is something I have called (most creatively) Dashboard. It is a modular PHP script that allows people to add various blocks of dynamic content on to a page which is displayed on the IP phone’s display. This script can be called directly by the phone or pushed using the cisco XML push service.

My dodgy composition shot below shows the Dashboard running on a Cisco 7975 phone displaying a RSS feed, the count of unread messages in my inbox and a graphical logo.

I am currently working allowing it to display multiple pages of information (using the remaining softkeys along the bottom of the screen between the Update and Exit buttons).

Dashboard WIP