Created May 2001

WS_FTP JavaScript Password Decoder

Go into the .ini file, and look for the lines which begin with PWD.
Enter the value of the PWD line:

It should look like hex encoded gobbledegook with "PWD=" attached to it:
PWD=V1DF32C1C88985F24FE8A3D03783C07E2A1667BA9AD77A96E
Encoded PWD Line
Decoded Password

Update 2015 from Tomasz:

Hey, there!

I found your WS_FTP old hash decoder, and some people were complaining that it doesn't decode the new WS_FTP hashes, so I thought I'd give you a hint in case you don't know the solution already, and feel like updating it some time in the future.

Check out this code - I implemented everything that's needed to decode WS_FTP version >=12 hashes here.
https://github.com/Ciastex/UniDec/blob/master/UniDec.WSFTP12.Codec/Codec.cs

I hope it'll help you a bit.

Source Code

<script type="text/javascript">
function wsFTP_decoder(in_string) {
	if (in_string.indexOf('PWD=', 0) === -1 || in_string.length - 37 < 0) {
		alert("ENTRY NOT VALID: be sure to enter the whole line, including 'PWD='");
	} else {
		my_password = in_string.substring(37, in_string.length);
		var x = "";
		for (var i = 0; i < my_password.length / 2; i++) {
			document.forms[0].decoded_entry.value = "";
			var my_character = my_password.substring(i * 2, i * 2 + 2);
			var my_parsed = in_string.substring(5 + i, 6 + i);
			var my_clear_txt = parseInt("0x" + my_character) - i - 1 - ((47 + parseInt("0x" + my_parsed)) % 57);
			x = x + String.fromCharCode(my_clear_txt);
			document.forms[0].decoded_entry.value = x;
		}
	}
}
</script> 
blog comments powered by Disqus