Esempio n. 1
0
        private void ck_weakpwd(HttpContext context)
        {
            string pwd = AppRequest.GetQueryString("pwd");//密码

            if (string.IsNullOrEmpty(pwd))
            {
                context.Response.Write(JsonHelper.ObjectToJSON(new { succeess = false, msg = "弱密码" }));
                return;
            }
            try
            {
                if (pwd.Contains("123456"))
                {
                    context.Response.Write(JsonHelper.ObjectToJSON(new { succeess = false, msg = "弱密码" }));
                    return;
                }
                if (pwd.Length != 32)
                {
                    string ckStatus = Utils.HttpGetUtf("http://monitor.qianniusoft.com/api/userWeakpwd/ckUserWeakPwd?password="******"succeess"];
                        string msg     = dicCK["msg"].ToString();
                        if (!succuss)
                        {
                            context.Response.Write(JsonHelper.ObjectToJSON(new { succeess = false, msg = msg }));
                            return;
                        }
                    }
                    else
                    {
                        context.Response.Write(JsonHelper.ObjectToJSON(new { succeess = false, msg = "弱密码" }));
                        return;
                    }
                }
                else
                {
                    if (LimitPhoneHelper.GetWeakPwdList().Contains(pwd))
                    {
                        context.Response.Write(JsonHelper.ObjectToJSON(new { succeess = false, msg = "弱密码" }));
                        return;
                    }
                }
            }
            catch (Exception ex)
            {
            }
            context.Response.Write(JsonHelper.ObjectToJSON(new { succeess = true, msg = "正常密码" }));
            return;
        }
Esempio n. 2
0
        private void ck_phone(HttpContext context)
        {
            string phone = AppRequest.GetQueryString("phone", true);//电话号码

            if (!Regexlib.IsValidMobile(phone))
            {
                context.Response.Write(JsonHelper.ObjectToJSON(new { succeess = false, msg = "电话号码格式不正确" }));
                return;
            }
            try
            {
                if (LimitPhoneHelper.IsContains(phone))
                {
                    context.Response.Write(JsonHelper.ObjectToJSON(new { succeess = false, msg = "注册失败,网络错误" }));
                    return;
                }
                //string ckStatus = Utils.HttpGetUtf("http://monitor.qianniusoft.com/api/userBlacklist/ckUserBlackList?UserPhone=" + phone);
                //Dictionary<string, object> dicCK = JsonHelper.DataRowFromJSON(ckStatus);
                //if (dicCK.Count > 0)
                //{
                //    bool succuss = (bool)dicCK["succeess"];
                //    string msg = dicCK["msg"].ToString();
                //    if (!succuss)
                //    {
                //        context.Response.Write(JsonHelper.ObjectToJSON(new { succeess = false, msg = msg }));
                //        return;
                //    }
                //}
                //else
                //{
                //    context.Response.Write(JsonHelper.ObjectToJSON(new { succeess = false, msg = "注册失败,网络错误" }));
                //    return;
                //}
            }
            catch (Exception ex)
            {
            }
            context.Response.Write(JsonHelper.ObjectToJSON(new { succeess = true, msg = "该号码可以注册" }));
            return;
        }