For those of us accustomed to working with Perl and PHP, VBScript can really throw you for a loop. However, because so many medium-sized corporations, government departments and educational institutions are using in-house Windows-based Web servers, we have to learn it.
One of the things that really threw me off was the fact that there are no pre-built functions in VBScript. Since I have no access to the server itself (I’m the Web developer, not the IT guy), I can’t install any add-ins or anything on the server. I have to deal with what I’ve got, and what I’ve got is the base package that comes with Windows Server.
I know there are a lot of other developers in the same position, so I thought I would start sharing some of the helpful tools I come across while working on various projects in VBScript.
One of those tools is an MD5 encryption script. It is already pre-built, and is very easy to use. Basically, you save the file on your server, then you “include” it in your ASP file. Whenever you need to encrypt something, you use the md5 function, just like you would in PHP.
I actually found quite a few different scripts that said they were written for use with VBScript, but all of them were either extremely complicated, or didn’t actually work. Some of them said VBScript, but actually meant regular VB (or possibly VBA). Some of them included 7 or 8 files, and required you to jump through complicated hoops in order to make them work.
This one actually includes 7 or 8 files as well, but that’s a good thing. Each file in the package has a separate purpose, and you really only need to choose which one you want. The package includes a VBScript version, a VB version, a javascript version (which can be helpful if you want to do on-the-fly encryption client-side, then finalize it server-side) and a couple of example files to show you how it works.
That’s all there is to it. Just put the file on your server (you must, at the very least, have either FTP or direct network access to your server, otherwise you wouldn’t be able to develop much), then add an include statement to your ASP file. The script does the rest of the work for you.
The script can be downloaded from Frez Systems Limited. There are actually quite a few other VB and VBScript tools available from that site, too.
One Response
Please make sure to salt anything that you hash. Cracking methods are becoming very effective at cracking MD5 hashes. Sites like http://www.netmd5crack.com can crack common un-salted hashes easily. Rainbow tables also offer further cracking ability. Please, for your sake and your client’s sake, salt those hashes!