looks to be a modified version of a piece of Olathe\'s DCC exploit fix, one version of which is at http://www.bluetack.co.uk/forums/index.php?showtopic=2844
you really should give credit to your sources :P although you are a couple of years late, this vulnerability has long since been corrected