Posts

Showing posts from May, 2012

How I brute-forced my own keystore password

How I brute-forced my own keystore password If, like me, you've been in the unfortunate siutation where you have forgotten your own keystore (or certificate key) password then help may be at hand. After some fruitless searching I decide to write my own piece of software to brute force my keystore certificate.  As I am/have been a Java programmer I decided to write it in the language I knew best, and this is how I did it. I have made the  source code  available for anyone who wants it Loading the keystore The Java API already has code for loading a keystore, java.security.KeyStore.  The keystore needs to be placed on the classpath (I just stuck it in the root on my Eclipse project) // Load the keystore in the user's home directory File file = new File(keystoreName); is = new FileInputStream(file); KeyStore keystore = KeyStore.getInstance(KeyStore.getDefaultType()); keystore.load(is, keystorePassword.toCharArray()); return keystore; The above code simply attempt

Installing and using mobilize.js to transform a desktop site to a mobile site

Image
Installing and using mobilize.js to transform a desktop site to a mobile site mobilize.js offers a neat and simple method of creating a mobile optimised website with very little change to the main desktop site. With a few lines of javascript and some css you can create a mobile optimised site without having to maintain 2 different sets of content. However the instructions on the official site aren't the best. So with some digging I managed to transform - From this (Firefox on my laptop): To this (Android browser on my Samsung Galaxy Nexus): with no html changes other than adding some <script> tags to the <head> element.  Plus automatic browser detection to display either site depending on the browser used - mobile, or desktop Here are some step-by-step instructions on getting it working. Why would you want to? So going back to the beginning, these were my requirements:  I wanted to create a mobile optimised site but, as I already had a