There have been a number of posts regarding IMail password decryption in the 
past.  Since it's been a while, I've attached the script I wrote.

Usage: GetPassword [EMAIL PROTECTED]

Replace [EMAIL PROTECTED] with the email address for which you want to retrieve 
the password

Darin.


----- Original Message ----- 
From: [EMAIL PROTECTED] 
To: [email protected] 
Sent: Wednesday, May 16, 2007 10:27 AM
Subject: [IMail Forum] decrypt passwords of certain usernames


Hi list,
I searched the archives,
but didn't really find anything helpful.

Is it possible to decrypt the password
of certain usernames ?

I want to transfer some domains
from one server to another different eMail-Server without
asking the customers according the
passwords.

Uwe


To Unsubscribe: http://www.ipswitch.com/support/mailing-lists.html
List Archive: http://www.mail-archive.com/imail_forum%40list.ipswitch.com/
Knowledge Base/FAQ: http://www.ipswitch.com/support/IMail/


--------------------------------------------------------------------------------

option explicit

Dim WshShell, objArgs, domain, username, passwordEncrypted, password
Dim count, characterU, characterP, asciiU, asciiTotal, asciiP, tempnumber1, 
tempNumber2
Dim uCount, emailAddress, splitemail

set objArgs = WScript.Arguments
Set WshShell = WScript.CreateObject("WScript.Shell")

emailAddress = lcase(trim(objArgs(0)))
splitEmail = split(emailAddress,"@")
username = splitEmail(0)
domain = splitEmail(1)
passwordEncrypted = WshShell.RegRead("HKLM\Software\IPSwitch\IMail\Domains\" & 
domain & "\Users\" & username & "\Password")

count = 1
Ucount = count
password = ""

do until (count * 2) > len(passwordEncrypted)
        characterU = right(left(username, Ucount),1)
        characterP = right(left(passwordEncrypted, count * 2), 2)
        tempNumber1 = left(characterP, 1)
        select case left(characterP, 1)
                case "A"
                        tempNumber1 = 10
                case "B"
                        tempNumber1 = 11
                case "C"
                        tempNumber1 = 12
                case "D"
                        tempNumber1 = 13
                case "E"
                        tempNumber1 = 14
                case "F"
                        tempNumber1 = 15
        end select
        tempNumber2 = right(characterP, 1)
        select case right(characterP, 1)
                case "A"
                        tempNumber2 = 10
                case "B"
                        tempNumber2 = 11
                case "C"
                        tempNumber2 = 12
                case "D"
                        tempNumber2 = 13
                case "E"
                        tempNumber2 = 14
                case "F"
                        tempNumber2 = 15
        end select
        asciiTotal = (16 * tempNumber1) + tempNumber2
        asciiU = asc(characterU)
        asciiP = asciiTotal - asciiU
        password = password & chr(asciiP)
        count = count + 1
        if Ucount = len(username) then
                Ucount = 1
        else
                Ucount = Ucount + 1
        end if
loop
Wscript.echo password


<<< text/html; charset=us-ascii: Unrecognized >>>

Reply via email to