WS_FTP Password Recovery
Posted: Wed Oct 08, 2003 8:17 am
Code updated For 5.20+
Hello,
here are two routines ported to PureBasic to recover your Passwords decrypted by the programm WS_FTP!
For new WS_FTP Versions:
The Decryption-Routine for older Versions
I compiled them into a little tool, which you can download here :
http://www.weltenkonstrukteur.de/cw.html
Hello,
here are two routines ported to PureBasic to recover your Passwords decrypted by the programm WS_FTP!
For new WS_FTP Versions:
Code: Select all
Procedure.s DecryptNeu(pw.s)
If (Len(pw.s) < 35)
ProcedureReturn "Err01" ; PW-Länge zu kurz
EndIf
noofpwchars=Len(pw.s)
a = noofpwchars % 2 ; PW-Länge muß ungerade sein!
If (a = 0)
ProcedureReturn "Err02" ; PW falsche Länge
EndIf
lenofpw = ((Len(pw.s)-33) / 2)
For i=1 To lenofpw
ascii.s = Mid(pw.s, i+1, 1);
asciiCode.l = Asc(ascii)
asciiCode = asciiCode & 63
pwchar.s = "$"+ Mid(pw.s, (32+(i*2)), 2)
pwcharint.l = Val(pwchar.s)
pwchar.s = Chr(pwcharint-asciiCode-(i-1))
dpw.s = dpw.s+pwchar.s
Next i
ProcedureReturn dpw.s
EndProcedure
Code: Select all
Procedure.s DecryptOld(pw.s)
If (Len(pw.s) < 2)
ProcedureReturn "Err01" ; PW-Länge zu kurz
EndIf
noofpwchars=Len(pw.s)
a = noofpwchars % 2 ; PW-Länge muß gerade sein!
If (a <> 0)
ProcedureReturn "Err02" ; PW falsche Länge
EndIf
lenofpw = (Len(pw.s) / 2)
For i=1 To lenofpw
pwchar.s = "$" + Mid(pw.s,(i*2)-1,2)
pwcharint.l = Val(pwchar.s)
pwchar.s = Chr(pwcharint - (i-1))
dpw.s = dpw.s + pwchar.s
Next i
ProcedureReturn dpw.s
EndProcedure
http://www.weltenkonstrukteur.de/cw.html