コード例 #1
0
        private void bg_get_user_DoWork(object sender, DoWorkEventArgs e)
        {
            string usr    = "";
            IntPtr Acc_Id = (IntPtr)0x00713164;
            IntPtr u_id1  = (IntPtr)0x0071107C;
            IntPtr u_id2  = (IntPtr)0x0184B30C;

            while (detect)
            {
                int aid = k.Memory.Read <int>(Acc_Id) * 11; //BitConverter.ToInt32(khan.ReadByte(Acc_Id, (uint)4), 0) * 4;
                //byte[] usr_b = khan.ReadByte(u_id1, (uint)14);

                /*
                 * usr = System.Text.Encoding.Default.GetString(usr_b);
                 * if (usr.Length < 3)
                 *  usr = BitConverter.ToString(khan.ReadByte(u_id2, (uint)14), 0);
                 */
                usr = Readstr(u_id1, 14); //k.Memory.Read<string>(CA.cInf.u_id1);//System.Text.Encoding.Default.GetString(usr_b);
                if (usr.Length < 3)
                {
                    usr = Readstr(u_id2, 14); //k.Memory.Read<string>(CA.cInf.u_id2);
                }
                if (usr != "")
                {
                    string crp_usr = Cryptography.AESEncryptString(usr, "DmXtreme", "@waKening");
                    txt_id.Text   = aid.ToString();
                    txt_code.Text = crp_usr;
                }
                Thread.Sleep(100);
            }
        }
コード例 #2
0
        public static void SetUser(HttpCookieCollection cookies, UserData user)
        {
            FormsAuthentication.SetAuthCookie(user.ID, false);
            HttpCookie dataCookie = new HttpCookie("AdminDataJson", Cryptography.AESEncryptString(JsonConvert.SerializeObject(user)));

            dataCookie.Expires = DateTime.Now.AddYears(1);
            cookies.Add(dataCookie);
        }