Friday, January 11, 2002, 8:32:56 AM, Connie Chan wrote: > now, I am writing a script which to let user modify the password of > their email account automatically, but our email server will encrypy > the password in some ways..... so it makes me unable to cmp or write.
> such as, if I give "A" as a new pass, it encrypted as QQ== in the user's profile. > if I give "AA", it encrypted as QUE= > if I give "AAA", it enctypted as QUFB > if I give "B", it change to Qg== > if I give "BB", it change to QkI= > if I give "BBB", it change to QkJC > any expert can help me to accomplish this un-encryption, or give > me some ideas on how to make this up ? I've tried to think from > ascii code, change ascii from bin, hex, oct, dec..... and analysis what > is varying... but I got nothing related... Thank you very much for any help.... you're in luck - there isn't any encryption performed at all. #!/usr/bin/perl -w use strict; use MIME::Base64; my $enc = encode_base64("AAA"); print "$enc\n"; it does Base64 encoding of the password, doesn't add in any sort of hashing or anything. those are basically plain-text passwords. to get back the other way go my $pass = decode_base64("QUE="); and that's it. -- Best Regards, Daniel [EMAIL PROTECTED] -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]