IMail cipher encryption algorithm and VBS implementation


All iMail’s post office information, such as users and passwords, is actually stored in the computer registry, so you only need to
Open the registry to see all the information in iMail, including the user’s password
IMail stores all enterprise post office information in:
In such a key, domainname is the post office name, and the user name is the user name. Under < username >, there is a key named password, which is the stored user password. The password is not stored in plaintext, but generated after simple encryption operation. Its encryption process is as follows:
1. Read the user name and make it all lowercase
2. Convert each number of user name into corresponding ASCII code
3. Calculate the offset of each letter and the first letter in the user name
4. Calculate the corresponding ASCII code of each password letter
5. Add the reference value (the ASCII of the first letter of the user name minus 97) to each ASCII code of the password, and then add the offset corresponding to the user name
6. You can get the password by corresponding to the password table
The specific procedures are as follows:

Sub initcode (byref infos) ‘
     for z=0 to Ubound(CodeArray)
         for y=0 to Ubound(CodeArray)
             Infos.Add Cstr(Count),CodeArray(z) & CodeArray(y)
End Sub

Function getimailpassword (user, pass)’imail password encryption function
     Set objDict=CreateObject(“Scripting.Dictionary”)
     Call initCode(objDict)
User = lcase (user) ‘converts the user to lowercase
First charcode = ASC (firstchar) ‘get the ASCII code of the first letter
Reference = firstcharcode-97 ‘to get the reference value
Execute “dim usercode (” & len (user) – 1 & “)” ‘defines two arrays to store user and password ASCII
     execute “Dim PassCode(” & len(Pass)-1 & “)”
For I = 0 to len (user) – 1 ‘gets the offset of the user’s letter
For J = 0 to len (pass) – 1 ‘to obtain the new value corresponding to the password
         iPos=j mod len(User)
For k = 0 to UBound (passcode) ‘
         encryptCode= encryptCode & objDict.item(Cstr(PassCode(k)))
end function

Iuser = “web9898″‘imail user name for testing
IPASS = “web9898. CN”‘imail password for testing
Wscript.Echo IPASS & “the encrypted password is: & getimailpassword (iuser, IPASS)

Recommended Today

Regular expression sharing for checking primes

This regular expression is shown as follows: Regular expressions for checking prime numbers or not To use this positive regular expression, you need to convert the natural number into multiple 1 strings. For example, 2 should be written as “11”, 3 should be written as “111”, 17 should be written as “11111111111”. This kind of […]