All Forums >> [Scripting] >> Post a VBScript >> Decode base64 Strings Do you like VisualBasicScript.com? Link to us and help spread the word about our forum. Thanks!
I find this function to be usefull when dealing with nosy users. :) I find that sometimes I am forced to have a sensitive password buried in a script. I can try to wrap the script in an executable via primalscript (really, just a self-extracting/executing zip file), but if the script hangs due to OS instability or SOMETHING, the bald script itself is found in the temp directory, along with the cleartext password. And encoded scripts are ok, but when the user has access to the internet, they would be able to find 'script decoder' pretty easily. So. What to do? In the rare events that I HAVE to embed a password, I use Base64 to scramble it, include a decoder in the script, and then wrap it all in one of those .EXE's. That way, even if the script bombs for some reason, the user would have to find the temp file, open it, and understand it enough to rewrite it to show them the password through decoding. Still not perfect, or even close, but best I could do with vbscript. lol Have fun.
_____________________________
"Would you like to touch my monkey?" - Dieter (Mike Meyers)
"It is better to die like a tiger, than to live like a pussy." -Master Wong, from Balls of Fury
Thanks for the handy function. Research Alternative Data Streams on the web. With them you can hide a script in a perfectly normal looking text file and execute it from there. Nothing is exposed to the user unless they know the name of the stream.