Beispiel #1
0
        private void skinButton1_Click(object sender, EventArgs e)
        {
            string sData, sendcmdData;

            sData       = "";
            sendcmdData = "";
            sendcmdData = sendcmdData + "<username>" + skinTextBox1.Text.Trim() + "</username>";
            sendcmdData = sendcmdData + "<czkey>" + skinTextBox2.Text.Trim() + "</czkey>";
            sData       = SoftXLic.KS_CMD("cz", sendcmdData);
            MessageBox.Show(SoftXLic.GD_(sData, "message") + Environment.NewLine + SoftXLic.GD_(sData, "webdata"), "提示");
        }
Beispiel #2
0
        private void skinButton1_Click(object sender, EventArgs e)
        {
            string sData, sendcmdData;

            sData       = "";
            sendcmdData = "";
            sendcmdData = sendcmdData + "<username>" + tbUser.Text.Trim() + "</username>";
            if (tbReCharge.Text.Trim() != "")
            {
                sendcmdData = sendcmdData + "<czkey>" + tbReCharge.Text.Trim() + "</czkey>";
            }

            sendcmdData = sendcmdData + "<password>" + tbPwd.Text.Trim() + "</password>";
            sendcmdData = sendcmdData + "<password2>" + tbSPwd.Text.Trim() + "</password2>";
            sendcmdData = sendcmdData + "<bdinfo>" + tbBind.Text.Trim() + "</bdinfo>";
            sendcmdData = sendcmdData + "<puser>" + "" + "</puser>";
            sData       = SoftXLic.KS_CMD("reg", sendcmdData);

            MessageBox.Show(SoftXLic.GD_(sData, "message") + Environment.NewLine + SoftXLic.GD_(sData, "webdata"), "提示");
        }
Beispiel #3
0
        private void skinButton1_Click(object sender, EventArgs e)
        {
            string tmpstr, Srandomstr, errinfo;
            string randomstr = SoftXLic.GetRandomString();

            SoftXLic.Username = tbUser.Text.Trim();
            SoftXLic.Password = tbPwd.Text.Trim();
            SoftXLic.ClientId = "1".Trim();
            SoftXLic.Set(SoftXLic.Username + SoftXLic.Password + SoftXLic.ClientId);
            string fristData = SoftXLic.Check("<randomstr>" + randomstr + "</randomstr>");

            fristData = SoftXLic.FD_(fristData);
            if (SoftXLic.GD_(fristData, "state") != "100")
            {
                errinfo = SoftXLic.GD_(fristData, "message");
                errinfo = errinfo + Environment.NewLine + SoftXLic.GD_(fristData, "webdata");
                MessageBox.Show(errinfo, "登录失败");
            }
            else
            {
                //验证成功,要对数据读取和安全效验了
                Srandomstr = SoftXLic.GD_(fristData, "randomstr");
                //'这里只是做简单的等于比对,更多效验请充分发挥你的脑洞(在例子里写出来就没有什么安全性可言)
                if (randomstr != Srandomstr)
                {
                    SoftXLic.KS_CMD("exit", "");
                    MessageBox.Show("验证失败", "登录失败");
                    this.Close();
                }
                //如果选择了记住密码功能,登陆成功时就把帐号密码写进ini里
                SoftXLic.w_ini("config", "Rememberaccount", cbCheckPwd.Checked.ToString());
                SoftXLic.w_ini("config", "checkupdate", false.ToString());
                if (cbCheckPwd.Checked)
                {
                    SoftXLic.w_ini("config", "username", tbUser.Text);
                    SoftXLic.w_ini("config", "password", tbPwd.Text);
                    SoftXLic.w_ini("config", "clientid", "1");
                }
                tmpstr = "";
                tmpstr = tmpstr + "advapi返回的数据: " + SoftXLic.GD_(fristData, "advapi") + Environment.NewLine;
                tmpstr = tmpstr + "效验随机串: " + SoftXLic.GD_(fristData, "randomstr") + Environment.NewLine;
                tmpstr = tmpstr + "用户名: " + SoftXLic.GD_(fristData, "username") + Environment.NewLine;
                tmpstr = tmpstr + "返回信息A: " + SoftXLic.GD_(fristData, "InfoA") + Environment.NewLine;
                tmpstr = tmpstr + "返回信息B: " + SoftXLic.GD_(fristData, "InfoB") + Environment.NewLine;
                tmpstr = tmpstr + "用户时间剩余秒数: " + SoftXLic.GD_(fristData, "ShengYuMiaoShu") + Environment.NewLine;
                tmpstr = tmpstr + "用户到期日期: " + SoftXLic.GD_(fristData, "end iftime") + Environment.NewLine;
                tmpstr = tmpstr + "用户天数: " + SoftXLic.GD_(fristData, "cday") + Environment.NewLine;
                tmpstr = tmpstr + "用户点数: " + SoftXLic.GD_(fristData, "points") + Environment.NewLine;
                tmpstr = tmpstr + "用户最大通道号: " + SoftXLic.GD_(fristData, "linknum") + Environment.NewLine;
                tmpstr = tmpstr + "绑定信息: " + SoftXLic.GD_(fristData, "bdinfo") + Environment.NewLine;
                tmpstr = tmpstr + "用户标签: " + SoftXLic.GD_(fristData, "tag") + Environment.NewLine;
                tmpstr = tmpstr + "用户附属性: " + SoftXLic.GD_(fristData, "keyextattr") + Environment.NewLine;
                tmpstr = tmpstr + "用户备注: " + SoftXLic.GD_(fristData, "BeiZhu") + Environment.NewLine;
                tmpstr = tmpstr + "所属管理ID: " + SoftXLic.GD_(fristData, "managerid") + Environment.NewLine;
                tmpstr = tmpstr + "充值次数: " + SoftXLic.GD_(fristData, "cztimes") + Environment.NewLine;
                tmpstr = tmpstr + "用户私有数据: " + SoftXLic.GD_(fristData, "SiYouShuJu") + Environment.NewLine;
                tmpstr = tmpstr + "是否是公用帐号: :" + SoftXLic.GD_(fristData, "IsPubUser") + Environment.NewLine;
                tmpstr = tmpstr + "服务器网址: " + SoftXLic.GD_(fristData, "shostname") + Environment.NewLine;
                tmpstr = tmpstr + "服务器当前时间戮: " + SoftXLic.GD_(fristData, "shosttime") + Environment.NewLine;
                tmpstr = tmpstr + "自动解绑扣除的时间: " + SoftXLic.GD_(fristData, "unbind_changetime") + Environment.NewLine;
                tmpstr = tmpstr + "服务端设置的验证频率: " + SoftXLic.GD_(fristData, "YanZhengPinLv") + Environment.NewLine;
                tmpstr = tmpstr + "服务端返回的机器码: " + SoftXLic.GD_(fristData, "pccode") + Environment.NewLine;
                MessageBox.Show(tmpstr);

                // '取得了数据,也效验完了,载入你自己的程序窗口吧
                // '你还可以在你自己的程序里边再次通过check命令获取以上的数据
                //new TestForm().Show();//'改为载入你自己的窗口,这里是载入演示窗口
                this.DialogResult = DialogResult.OK;

                mainForm mf = new mainForm();
                this.Hide();
                mf.ShowDialog();
                Application.Exit();
            }
        }