项目初始化后续改动
This commit is contained in:
1 parent
40c702883c
commit
42acf1b1cb
67 files changed
+5794
-1762
No files matched your search
+97
-26
@@ -3,6 +3,7 @@ using System.Security.Cryptography;
|
||||
using System.Text;
|
||||
using System.Threading;
|
||||
using AllBase;
|
||||
using NaiBa.Util.Extension;
|
||||
|
||||
namespace Work
|
||||
{
|
||||
@@ -32,7 +33,7 @@ namespace Work
|
||||
BaseClass.UserName = Mobile;
|
||||
Random r = new Random();
|
||||
int r2 = r.Next(100000000, 899999999); //生成随机码
|
||||
string url = BaseClass.DouYinBuildObjString("login");
|
||||
string url = BaseClass.Build29WxObjString("user/user_login");
|
||||
for (int j = 0; j < 100 && string.IsNullOrEmpty(BaseClass.MacInfo); j++)
|
||||
{
|
||||
Thread.Sleep(10);
|
||||
@@ -40,6 +41,7 @@ namespace Work
|
||||
Agian:
|
||||
string data = "mobile=" + mobile + "&r2=" + r2 + "&password=" + passwordMd5 + "&" + GetSignature() + "&mac=" + BaseClass.MacInfo + "&version=" + BaseClass.VersionCount;
|
||||
data += "&from_tool=" + GetHtml.UrlEncodeUtf8(BaseClass.AgentName) + "&client_ip=" + GetHtml.UrlEncodeUtf8(BaseClass.IPAddress) + "&client_addr=" + GetHtml.UrlEncodeUtf8(BaseClass.IPAddressName);
|
||||
data += "&sub_soft_type=order";
|
||||
string html = GetHtml.PostUtf8(url, data);
|
||||
lockUserName = -1;
|
||||
weakPassword = -1;
|
||||
@@ -49,7 +51,7 @@ namespace Work
|
||||
if (!IsLoginDef)
|
||||
{
|
||||
IsLoginDef = true;
|
||||
url = BaseClass.DouYinBuildObjString("login");
|
||||
url = BaseClass.Build29WxObjString("login");
|
||||
goto Agian;
|
||||
}
|
||||
|
||||
@@ -80,42 +82,107 @@ namespace Work
|
||||
|
||||
if (IsLoginDef)
|
||||
{
|
||||
BaseClass.LoginApiUrl = "http://new.qixiaoke.com/";
|
||||
BaseClass.ImageApiUrl = BaseClass.LoginApiUrl + "index.php?obj=api/image";
|
||||
//BaseClass.LoginApiUrl = "http://new.qixiaoke.com/";
|
||||
//BaseClass.ImageApiUrl = BaseClass.LoginApiUrl + "index.php?obj=api/image";
|
||||
}
|
||||
|
||||
BaseClass.EndDate = BaseRegex.GetStringJson(ref html, "end");
|
||||
BaseClass.CompanyName = BaseRegex.GetStringJson(ref html, "company");
|
||||
BaseClass.UserId =Convert.ToInt32(BaseRegex.GetStringJson(ref html, "uid"));
|
||||
BaseClass.UserKey = Convert.ToInt32(BaseRegex.GetStringJson(ref html, "key"));
|
||||
BaseClass.NickName = BaseRegex.GetStringJson(ref html, "nickname");
|
||||
BaseClass.UserVersion = Convert.ToInt32(BaseRegex.GetStringJson(ref html, "v"));
|
||||
BaseClass.UserVersionString = BaseRegex.GetStringJson(ref html, "vt");
|
||||
BaseClass.CompanyId = Convert.ToInt32(BaseRegex.GetStringJson(ref html, "cid"));
|
||||
BaseClass.GroupId = Convert.ToInt32(BaseRegex.GetStringJson(ref html, "groupid"));
|
||||
BaseClass.Balance = Convert.ToInt32(BaseRegex.GetStringJson(ref html, "balance"));
|
||||
BaseClass.IsFactory = Convert.ToInt32(BaseRegex.GetStringJson(ref html, "factory")) == 1;
|
||||
BaseClass.IsCloudBuyOrder = Convert.ToInt32(BaseRegex.GetStringJson(ref html, "cloud_buy_order_status")) == 1;
|
||||
//BaseClass.EndDate = BaseRegex.GetStringJson(ref html, "end");
|
||||
//BaseClass.CompanyName = BaseRegex.GetStringJson(ref html, "company");
|
||||
//BaseClass.UserId =Convert.ToInt32(BaseRegex.GetStringJson(ref html, "uid"));
|
||||
//BaseClass.UserKey = Convert.ToInt32(BaseRegex.GetStringJson(ref html, "key"));
|
||||
//BaseClass.NickName = BaseRegex.GetStringJson(ref html, "nickname");
|
||||
//BaseClass.UserVersion = Convert.ToInt32(BaseRegex.GetStringJson(ref html, "v"));
|
||||
//BaseClass.UserVersionString = BaseRegex.GetStringJson(ref html, "vt");
|
||||
//BaseClass.CompanyId = Convert.ToInt32(BaseRegex.GetStringJson(ref html, "cid"));
|
||||
//BaseClass.GroupId = Convert.ToInt32(BaseRegex.GetStringJson(ref html, "groupid"));
|
||||
//BaseClass.Balance = Convert.ToInt32(BaseRegex.GetStringJson(ref html, "balance"));
|
||||
//BaseClass.IsFactory = Convert.ToInt32(BaseRegex.GetStringJson(ref html, "factory")) == 1;
|
||||
//BaseClass.IsCloudBuyOrder = Convert.ToInt32(BaseRegex.GetStringJson(ref html, "cloud_buy_order_status")) == 1;
|
||||
//if (BaseClass.GroupId != 3 && BaseClass.GroupId != 4 && BaseClass.GroupId != 9 && BaseClass.GroupId != 10 && BaseClass.GroupId != 11)
|
||||
//{
|
||||
// BaseClass.UserId = 0;
|
||||
// BaseClass.UserKey = 0;
|
||||
// return false;
|
||||
//}
|
||||
//BaseClass.EndDate = BaseRegex.GetStringJson(ref html, "end");
|
||||
//BaseClass.CompanyName = BaseRegex.GetStringJson(ref html, "company");
|
||||
|
||||
//string islock = BaseRegex.GetStringJson(ref html, "is_lock");
|
||||
//int.TryParse(islock, out lockUserName);
|
||||
//string isweak = BaseRegex.GetStringJson(ref html, "is_weak_password");
|
||||
//int.TryParse(isweak, out weakPassword);
|
||||
//messageInfo = BaseRegex.GetStringJson(ref html, "message");
|
||||
|
||||
//// 代理权限列表
|
||||
//string agent_auth = BaseRegex.GetStringJson(ref html, "agent_auth");
|
||||
|
||||
BaseClass.UserId = BaseRegex.GetStringJson(ref html, "id").ParseToInt();
|
||||
BaseClass.UserKey = BaseRegex.GetStringJson(ref html, "user_key").ParseToInt();
|
||||
BaseClass.NickName = BaseRegex.GetStringJson(ref html, "nick_name");
|
||||
BaseClass.UserName = BaseRegex.GetStringJson(ref html, "user_name");
|
||||
BaseClass.ParentUserName = BaseRegex.GetStringJson(ref html, "parent_user_name");
|
||||
BaseClass.SaLevel = BaseRegex.GetIntJson(ref html, "sa_level").ParseToInt();
|
||||
BaseClass.UserAuthority = BaseRegex.GetStringJson(ref html, "authority").ParseToString();
|
||||
BaseClass.ParentAuthority = BaseRegex.GetStringJson(ref html, "parent_authority").ParseToString();
|
||||
BaseClass.Mobile = BaseRegex.GetStringJson(ref html, "mobile");
|
||||
BaseClass.UserVersion = BaseRegex.GetStringJson(ref html, "version").ParseToInt();
|
||||
BaseClass.UserVersionString = BaseRegex.GetStringJson(ref html, "version_s");
|
||||
BaseClass.CompanyId = BaseRegex.GetStringJson(ref html, "company_Id").ParseToInt();
|
||||
BaseClass.GroupId = BaseRegex.GetStringJson(ref html, "group_id").ParseToInt();
|
||||
//BaseClass.AuthorizedAmount = BaseRegex.GetNullableDecimalJson(ref html, "authorized_amount");
|
||||
BaseClass.Points = BaseRegex.GetStringJson(ref html, "points").ParseToInt();
|
||||
BaseClass.ShopPointsPerMonth = BaseRegex.GetStringJson(ref html, "shop_points_per_month").ParseToInt();
|
||||
|
||||
if (BaseClass.GroupId != 3 && BaseClass.GroupId != 4 && BaseClass.GroupId != 9 && BaseClass.GroupId != 10 && BaseClass.GroupId != 11)
|
||||
{
|
||||
BaseClass.UserId = 0;
|
||||
BaseClass.UserKey = 0;
|
||||
return false;
|
||||
}
|
||||
|
||||
BaseClass.EndDate = BaseRegex.GetStringJson(ref html, "end");
|
||||
BaseClass.CompanyName = BaseRegex.GetStringJson(ref html, "company");
|
||||
|
||||
BaseClass.CompanyName = BaseRegex.GetStringJson(ref html, "company_name");
|
||||
if (BaseClass.UserVersion == 3)
|
||||
{
|
||||
BaseClass.QqGroupNum = BaseRegex.GetStringJson(ref html, "qq_group_num");
|
||||
BaseClass.QqGroupUrl = BaseRegex.GetStringJson(ref html, "qq_group_url");
|
||||
BaseClass.WechatUrl = BaseRegex.GetStringJson(ref html, "wechat_url");
|
||||
}
|
||||
if (BaseClass.UserVersion == 3 || BaseClass.UserVersion == 4 || BaseClass.UserVersion == 5 || BaseClass.UserVersion == 10 || BaseClass.UserVersion == 9)
|
||||
{
|
||||
BaseClass.IsPinduoduo = BaseRegex.GetStringJson(ref html, "pinduoduo") == "1";
|
||||
BaseClass.AlimamaDomain = BaseRegex.GetStringJson(ref html, "alimama_domain");
|
||||
BaseClass.AlimamaPid = BaseRegex.GetStringJson(ref html, "alimama_pid");
|
||||
}
|
||||
if (!BaseClass.UserApi && BaseClass.UserVersion != 110)
|
||||
BaseClass.UserVersion = 100;
|
||||
//if (BaseClass.UserVersion == 110)
|
||||
// BaseClass.ClientId = BaseSpecialConfig.ToolClientId; // 特别版本,使用指定ClientId
|
||||
|
||||
string islock = BaseRegex.GetStringJson(ref html, "is_lock");
|
||||
int.TryParse(islock, out lockUserName);
|
||||
string isweak = BaseRegex.GetStringJson(ref html, "is_weak_password");
|
||||
int.TryParse(isweak, out weakPassword);
|
||||
messageInfo = BaseRegex.GetStringJson(ref html, "message");
|
||||
|
||||
// 代理权限列表
|
||||
string agent_auth = BaseRegex.GetStringJson(ref html, "agent_auth");
|
||||
|
||||
//// 代理权限列表
|
||||
//string agent_auth = BaseRegex.GetStringJson(ref html, "agent_auth");
|
||||
//if (!string.IsNullOrEmpty(agent_auth) && agent_auth != "0")
|
||||
//{
|
||||
// var strArr = agent_auth.Split(new string[] { ";" }, StringSplitOptions.RemoveEmptyEntries);
|
||||
// foreach (var item in strArr)
|
||||
// {
|
||||
// var itemArr = item.Split(',');
|
||||
// if (itemArr.Length == 2)
|
||||
// {
|
||||
// BaseClass.AgentAuth[itemArr[0]] = itemArr[1];
|
||||
// }
|
||||
// }
|
||||
//}
|
||||
|
||||
Initialization i = new Initialization();
|
||||
BaseClass.IsLoginSuccess = true;
|
||||
|
||||
Initialization i = new Initialization();
|
||||
i.SaveConfig();
|
||||
return true;
|
||||
}
|
||||
@@ -134,7 +201,7 @@ namespace Work
|
||||
public bool Regedit(string mobile, string password, string code, string nickname, string email, out string message)
|
||||
{
|
||||
string passwordMd5 = Md5Base.GetMd5(password).ToLower();
|
||||
string url = BaseClass.DouYinBuildObjString("regedit");
|
||||
string url = BaseClass.Build29WxObjString("regedit");
|
||||
string data = "mobile=" + mobile + "&password=" + passwordMd5 + "&sms_code=" + code + "&nickname=" + GetHtml.UrlEncodeUtf8(nickname) +
|
||||
"&email=" + email + "&" + GetSignature();
|
||||
string html = GetHtml.PostUtf8(url, data);
|
||||
@@ -179,7 +246,7 @@ namespace Work
|
||||
public bool ResetPassword(string mobile, string code, string password, out string message)
|
||||
{
|
||||
string passwordMd5 = Md5Base.GetMd5(password).ToLower();
|
||||
string url = BaseClass.DouYinBuildObjString("reset_password");
|
||||
string url = BaseClass.Build29WxObjString("reset_password");
|
||||
string data = "mobile=" + mobile + "&password=" + passwordMd5 + "&sms_code=" + code + "&" + GetSignature();
|
||||
string html = GetHtml.PostUtf8(url, data);
|
||||
if (string.IsNullOrEmpty(html) || html.Contains("Error No File"))
|
||||
@@ -321,7 +388,11 @@ namespace Work
|
||||
/// <returns>加密签名结果</returns>
|
||||
public static string Encryption(int s)
|
||||
{
|
||||
return GetMd5(s + "sdhewu*/fhAAue48485ew5+5%@3485esGFFHFD");
|
||||
//return GetMd5(s + "sdhewu*/fhAAue48485ew5+5%@3485esGFFHFD");
|
||||
|
||||
string sign = $"{s}sdhewu*/fhAAue48485ew5+5%@3485esGFFHFD";
|
||||
return GetMd5(sign);
|
||||
|
||||
}
|
||||
|
||||
public string Get(string key)
|
||||
@@ -364,7 +435,7 @@ namespace Work
|
||||
/// <returns></returns>
|
||||
public static string SendCode(string mobile, out bool success)
|
||||
{
|
||||
string url = BaseClass.DouYinBuildObjString("sms_gate");
|
||||
string url = BaseClass.Build29WxObjString("sms_gate");
|
||||
string data = "mobile=" + mobile + "&" + GetSignature();
|
||||
string html = GetHtml.PostUtf8(url, data);
|
||||
success = false;
|
||||
|
||||
Reference in new issue
Block a user