Showing posts with label Techie Speak. Show all posts
Showing posts with label Techie Speak. Show all posts

Sunday, November 22, 2009

Converting from Password Depot to KeePassX

Bear with me for a moment all you non-technical people but I need to show that while I haven't been blogging I haven't been a complete slug and I have actually been doing something.

"Password Depot" is a very good password management program and since I deal with hundreds of the blighters it is an application that I absolutely have to have. Unfortunately it doesn't run on linux and it is getting a bit tiresome to load up a windows VM for no reason other than to get hold of a password so I looked around for a nice multi-platform password manager and KeePassX fits the bill. The only problem is that the export from Password Depot can't be imported into KeePassX so I had to do it the ugly way and write an xslt that converts from Password Depot export format to KeePassX import format. Someone else is bound to have this issue so here it is for anyone else that needs it.

Note that this comes with no guarantees from me and especially since the data elements in the Password Depot format do not map 1 to 1 with those in the KeePassX format so I made a few assumptions which I have been happy to accept but which others might not.

You can get the code for the xslt here

I am going to writing an application which takes the export from the Password Depot, the xslt above and returns the converted format for importing into KeePassX but I haven't got around to it so in the meantime, if you have access to XMLSpy that would work fine for applying the xslt.

Note to anyone from Password Depot that might read this, the DTD that is exported doesn't match the XML that follows. I found the following issues that should be corrected when you haven't got anything else to do. It doesn't affect the export, conversion and import but it would be nice if the DTD matched the actual XML exported.



The DTD listed at the top of the XML export of the contents of a PasswordDepot database
will cause any XSLT attempting to use the exported XML file to fail. In order to correct
the DTD the following alterations to the exported XML file must be done.

Original File has the following line:
<!ELEMENT GROUP (GROUP*,ITEM ) >
but the line should read like this:
<!ELEMENT GROUP (GROUP*,ITEM* ) >
Note the additional '*' after ITEM

Original File has the following line:
<!ELEMENT ITEM (DESCRIPTION ,PASSWORD ,USERNAME ,URL ,LASTMODIFIED ,EXPIRYDATE ,IMPORTANCE ,COMMENT ,TEMPLATE ,CUSTOMFIELDS ) >
but the line should read like this:
<!ELEMENT ITEM (DESCRIPTION ,PASSWORD ,USERNAME ,URL ,LASTMODIFIED ,EXPIRYDATE ,IMPORTANCE ,COMMENT ,TEMPLATE ,CUSTOMFIELDS* ) >
Note the additional '*' after CUSTOMFIELDS

Original File has the following line:
<!ELEMENT CUSTOMFIELDS (FIELD ) >
but the line should read like this:
<!ELEMENT CUSTOMFIELDS (FIELD* ) >
Note the additional '*' after FIELD

Original File has the following line:
<!ELEMENT FIELD (NAME ,VALUE ) >

<!ELEMENT VALUE (#PCDATA) >
but the line should read like this:
<!ELEMENT FIELD (NAME ,VALUE ) >

<!ELEMENT NAME (#PCDATA) >

<!ELEMENT VALUE (#PCDATA) >
Note the addition of the definition of the NAME element

Wednesday, September 02, 2009

SocketListener

What does it do?
SocketListener listens on an IP address and Port for inbound connections. If a connection is received any data received on the connection will be written to a binary logfile called "SocketListener.data" and a record of the connection is written to a text file called "SocketListener.log". In addition to recording inbound data without interpreting it at all; SocketListener can be configured to respond to connections with either an echo of inbound data or a binary data stream taken from a binary file on disk.

Where can I get it?
http://dl.getdropbox.com/u/293834/SocketListener.zip

What is it for?
1. A very simple TCP/IP server which can be very useful when testing the
configuration of firewalls and other network components because you know
that there is something listing on a specific IP and port.
2. Diagnosis of data received when developing interfaces. E.g people in france
say that they sent data in a particular format but your server didn't get it
in the same format and threw it out.
3. Testing of exception handling where the client receives ill formatted or
illegal data that the working server would never normally send back.
4. Any other case where one wants to very quickly have a look at the binary
data received or test the response handling in a client.

Why not use a sniffer? Because of the segmented nature of the networks nowadays one ends up installing sniffers all over the network to monitor what is mostly very simple traffic issues so although it *sort of* sniffs it is not meant to
replace a proper sniffer.

Compiling.
Assuming that you have a jdk installed, run the following in the src directory.
javac SocketListener.java
which will create a SocketListener.class in the same directory.

Running.
If you have compiled it yourself run it on any machine with a jre installed by:
java SocketListener [-p port] [-a IPAddress] [-o filename | -e]

If you are using the precompiled SocketListener.jar:
java -jar SocketListener.jar [-p port] [-a IPAddress] [-o filename | -e]

where parameters are:
[-p port] to listen on a port different from the default of 9021
[-a IPAddress] to listen on an IP address different from "0.0.0.0" i.e. all NIC's
[-o filename | -e] Respond to inbound connections with the contents of "filename" or respond by echoing the inbound data. Default is not to respond at all.

Wednesday, February 04, 2009

New TOY!

There is something about being in IT (pronounced as "it" as in "where is it?" if you're my mother-in-law) and requiring a constant stream of new toys. 'Officially' my new toy is a necessity for our upcoming travels in the first world in order to continue writing my blog whilst away from my latop which is just "too big" to lug around europe. Enter the EeePC pictured below ...

with my current laptop in the foreground for comparison. Aside from the actual size of the EeePC it has a SSD drive of 20GB which has no moving parts. When I purchased it I thought I was buying the linux version but when I booted it up the windows virus had spread and greeted me with the BSOD so I just had to nuke it and put ubuntu (being all african and that) on which had been pretty impressive. A small amount of problems with the wireless network card because of hardware drivers but fairly simply sorted out. What is really remarkable is how usable it actually is given it's tiny size of screen and keyboard. This is my first blog from my new laptop.

Sunday, November 23, 2008

Open Source Economics

I was talking to jason a few weeks ago, actually it must be more like 6 or 8 weeks ago, about open source software and he was questioning how it actually works from a business point of view and I didn't have a very coherent answer to give to him. I've never really thought much about it and I am sure that someone somewhere has probably delved into it in great detail. My answer may still not be that coherent but for what it is worth; here it is.

Restating the question so I can keep in mind what I am trying to answer; the question is "How can I make money if I open source my creative work, thus enabling my potential or real competitors to compete with me on a level playing field?"

I think that this should be split up for the sake of discussion into several statements;

1. "The objective of the person making the statement is to make money; not indulge in an altruistic venture."
Although some people are altruistic in parts of or in some rare cases all of their lives; most people are not and I would find it pretty hard to believe that all open source developers are entirely altruistic. Since open source software doesn't seem to be going away something must be driving it and I think that to answer this, one should consider the net benefit of open source to the creators of the creative works rather than the benefit of the created work in isolation. If one were to give away a small value, being the time invested in creating the creative work, but in return receive a much larger value being the time invested by other people in their creative works which one uses; although no money has changed hands, value certainly has and one would be a net beneficiary.


2. "Releasing a creative work under an open source license really is "giving it away" for other people to use pretty much as they please within the limits of the open source license."
Software, like knowledge, has an unusual property in that it may be shared as in "given away" with both the giver and receiver maintaining full use of or access to it. I think one of the basic problems with understanding open source is the very human resistance to "giving it all away" which is in essence what one is doing as the author of an application or work released under an open source license. Again, one really needs to look at net benefit rather than the isolated return from the creative work in question because although you are indeed "giving it all away" the "all" only describes what is being given away and not what is being received. As long as what is received is of more value than that given away, there is a positive reason to participate.

3. "Competitors really would have access to your creative work and therefore be able to compete against you on a level playing field."
True, competitors really would have access to your creative work but that does not necessarily mean that they are competing against you on a level playing field. There are many aspects that together contribute to the succcess of an enterprise and only some of them relate to the actual product being sold. Alternatively, if what one is giving away isn't in the same playing field that one competes in, the whole question goes away altogether because it may not be possible for a competitor to really use it against you.

I would like to divide businesses up into two categories for the sake of this discussion; those that develop and sell software (open or closed source) and those that don't actually sell software but use software in the production of something else that people pay for be it a services or physical goods. I think that the first category of software creators is in for a rough ride and may even be doomed mostly because the second category of businesses are constantly looking for ways to decrease costs in the production of their services or physical goods. If one way for them to do this is to create applications that are open sourced and in return they gain access to a much higher value by being able to use other peoples open sourced applications; they will do so. Moreover, since they are not trying to derive income from the sale of the actual software produced as it is a almost a by-product of whatever they are actually producing, it is going to be very difficult for the first category of software developers to match. In other words, it is in the interests of those businesses whose products are not software to support open source initiatives since for relatively small amount invested, they can derive substantially more value than invested. Of course there are always going to be free-loaders, those who use but do not contribute anything in return but aside from the unfairness of this, as long as there is a net benefit to those that do contribute; they will continue to do so.

For those that produce software products that they sell and in turn pay for the software products used in the production of their own products there is no moral dilema between closed and open source but they had better hope that their product isn't or doesn't become someone else's by-product. By "someone else" I am not meaning the monolithic business typically thought about but could be universities, businesses or just groups of interested individuals whose interest in the product isn't monetary.

For those that produce services or physical goods, it is in their interests to support open source software since by doing so they are able to derive disproportionate value for the value invested and if they don't have a moral backbone, this ratio tends towards infinity since they don't pay for anything but simply decrease costs.

So, the simple answer is "You can't" but that is not to say that open source does not have a valuable part to play in business in the future.

I feel sure that I will revise this at some later stage but these are my thoughts to date.

Monday, April 28, 2008

Sentech Sucks

Ok, I've had it with Sentech! I have been an unhappy customer of Sentech's for four years and I can no longer take it so I have moved to iBurst even though I have it on good authority that Sentech's technology is superior to iBurst's.

The following is a non-exhaustive list of my woes with Sentech.
  • Cut off for R5.30 (about $0.75c) over my limit. No warning emails were received even though that was part of the service.
  • They 'forgot' to bill me for about six months and then wanted a lump sum payment.
  • Refused to support me because I use the modem on a network to give the network access to the internet.
  • Refused to support me because I don't use windows as an operating system.
  • Performed a network upgrade resulting in the firmware in my particular modem no longer working.
  • Modem locks up periodically and needs to be reset.
  • Base stations/signal not always available.
  • Download speeds vary between 200B/s to 150KB/s but are typically of the order of 40-70KB/s.
  • Cut off SMTP access from Sentech's network to other networks. No notification given.

I would admit that some of these like the firmware upgrade are difficult to predict in reality but customers are not the enemy here.

Anyway, I am now happily on iBurst which gives me a fairly consistent download speed of 100KB/sec which although slower than the higher speeds on Sentech still give me faster download times because the network is more stable.

The reason that I stuck it out so long with Sentech is the price of the wireless modem I had to buy but moving to iBurst they just about give their modem away all but removing it as a barrier to adoption.

Tuesday, April 15, 2008

New Toys

This is my first post from my new PC which I took delivery of today. My old PC has been getting slower and slower just from a sheer lack of memory and CPU power - something my new PC doesn't lack. Quad core, 4GB RAM, reasonable Nvidia graphics card - way to go. At last I can open photographs in GIMP without having to make a cup of coffee while I wait, and wait. Now, it takes just a few seconds. Awesome!

I have gotta go because I can see the darkness of Eskom rolling in from the sout

Wednesday, August 22, 2007

UuuuuuBuuuuuntuuuuuu!!!!

I have been warned that the ubuntu would eventually get me and so it has. Ubuntu, for those non-'it' people out there, is a version of the linux operating system which has been making huge inroads into the linux world and is specifically targeted at the desktop - and area that linux has traditionally been very poor at. It is not that linux couldn't be used as a desktop OS it was just that you had to be quite technically competent in order to get it working and keep it working. Ubuntu is like linux for dummies, unbelievably easy to set up and unlike windows it comes prepackaged with pretty much all the applications one would normally use. If you don't like a particular package like I prefer Thunderbird to Evolution as a mail client, installing Thunderbird is a breeze just do the obvious and click on Applications -> Add/Remove and in no time at all it's installed.

There is one problem with linux which hasn't been sorted out and I'm not sure that there is a solution. The problem is that each distro (ubuntu in this case) comes out with a new version pretty much each year so it means that you should be upgrading your system each year. The upgrading isn't so bad but getting ones' data from one to another can be quite a pain and of course there is the risk that if you do something wrong when you backup your data - you might loose it forever. For myself, the solution lies in having two harddrives which I use alternately so at any given time, the one harddrive has the old operating system on it with all my data and the other has the new operating system on it with all my data as well. When I need to upgrade again, I simply reformat the old hard drive and install a clean operating system on it and copy all my data from what was the new drive but is now the old drive if you get what I mean. For real backups I just use a USB drive and copy all my data onto it once a month. KISS.

So, all in all I would highly recommend that anyone tired of paying for software whose capabilities far exceed one's requirements give ubuntu a go.