大家好,能不能通过改这段代码来实现VIP的功能,谢谢
// ns18.frmStart// Token: 0x06000B02 RID: 2818 RVA: 0x000F9914 File Offset: 0x000F7B14
public string method_0()
{
Class36.string_2 = "";
Class40 @class = new Class40();
string result = "";
Class136 class2 = new Class136();
Class36.Class37.string_2 = class2.method_3();
Class49 class3 = new Class49();
ReturnStart returnStart;
returnStart;
Class36.Class37.string_3 = returnStart.method_0(returnStart, "SOFTWARE\\UUsoft\\VGBrowser", "regCode");
if (!string.IsNullOrEmpty(Class36.Class37.string_3) || (!string.IsNullOrEmpty(@class.User_UserName) && !string.IsNullOrEmpty(@class.User_Password)))
{
string text = new Random().Next(1000, 9999).ToString();
string string_ = string.Concat(new string[]
{
"{\"n\":\"",
text,
"\",\"opt\":\"start\",\"rc\":\"",
Class36.Class37.string_3,
"\",\"user\":\"",
@class.User_UserName,
"\",\"pwd\":\"",
@class.User_Password,
"\"}"
});
string str = Class31.smethod_6(string_);
string url = "http://www.visualget.com/api/client";
HttpHelper httpHelper = new HttpHelper();
HttpItem httpItem = new HttpItem
{
Method = "POST",
ContentType = "application/x-www-form-urlencoded",
URL = url,
Postdata = "que=" + str,
IsUpdateCookie = false
};
HttpResult html = httpHelper.GetHtml(httpItem);
string text2 = Class31.smethod_8(html.Html ?? "");
if (text2 != "")
{
MemoryStream stream = new MemoryStream(Encoding.Default.GetBytes(text2));
DataContractJsonSerializer dataContractJsonSerializer = new DataContractJsonSerializer(typeof(ReturnStart));
returnStart = (ReturnStart)dataContractJsonSerializer.ReadObject(stream);
Class36.Class37.iSID = returnStart.sid;
switch (Class36.Class37.iSID)
{
case 2:
case 3:
Class36.Class37.strUserType = "旗舰版";
break;
default:
Class36.Class37.strUserType = "免费版";
break;
}
Class36.Class37.int_0 = returnStart.loginstatus;
if (returnStart.loginstatus == 1)
{
Class36.string_2 = HttpHelper.GetSmallCookie(html.Cookie);
}
if (returnStart.rc != Class36.Class37.string_3)
{
result = "注册码无效";
}
else
{
DateTime dateTime;
DateTime.TryParse(returnStart.enddate, out dateTime);
Class36.Class37.dateTime_0 = dateTime;
DateTime dateTime_;
DateTime.TryParse(returnStart.eenddate, out dateTime_);
Class36.Class37.dateTime_1 = dateTime_;
if (dateTime > DateTime.Now)
{
if (dateTime.ToString("yyyyMMdd") == "22000101")
{
Class36.Class37.string_1 = "不限";
}
else
{
Class36.Class37.string_1 = dateTime.ToString("yyyy-MM-dd HH:mm:ss");
}
}
else
{
result = "注册码已过期";
Class36.Class37.string_1 = dateTime.ToString("yyyy-MM-dd HH:mm:ss") + "(过期)";
}
if (returnStart.n == text && !string.IsNullOrEmpty(returnStart.apc) && returnStart.apc == Class36.Class37.string_2)
{
Class36.Class37.bool_0 = true;
if (dateTime > DateTime.Now)
{
result = "注册正常";
Class36.Class37.bIsSoftVip = true;
}
else
{
result = "注册码已过期";
}
}
else if (!string.IsNullOrEmpty(returnStart.apc) && returnStart.apc != Class36.Class37.string_2)
{
result = "需要激活";
}
}
}
}
return result;
}
Class36.Class37.iSID = returnStart.sid;
修改为
Class36.Class37.iSID = 3; 理论上可以,只要知道返回什么数据格式,通过本地搭建服务器可以现实vip功能 很好牛叉,小白完全看不懂 同意楼上的,还可以再加上,最后一句:
return result;
改为:
return "注册正常";
本帖最后由 ixsec 于 2019-10-10 17:36 编辑
if (text2 != "")
{
MemoryStream stream = new MemoryStream(Encoding.Default.GetBytes(text2));
DataContractJsonSerializer dataContractJsonSerializer = new DataContractJsonSerializer(typeof(ReturnStart));
returnStart = (ReturnStart)dataContractJsonSerializer.ReadObject(stream);
Class36.Class37.iSID = returnStart.sid;
switch (Class36.Class37.iSID)
{
case 2:
Class36.Class37.strUserType = "旗舰版";
break;
case 3:
Class36.Class37.strUserType = "旗舰版";
break;
default:
Class36.Class37.strUserType = "旗舰版";
break;
}
Class36.Class37.int_0 = returnStart.loginstatus;
if (returnStart.loginstatus == 1)
{
// Class36.string_2 = HttpHelper.GetSmallCookie(html.Cookie);
}
if (returnStart.rc != Class36.Class37.string_3)
{
result = "注册正常";
Class36.Class37.bIsSoftVip = true;
}
else
{
DateTime dateTime;
DateTime.TryParse(returnStart.enddate, out dateTime);
Class36.Class37.dateTime_0 = dateTime;
DateTime dateTime_;
DateTime.TryParse(returnStart.eenddate, out dateTime_);
Class36.Class37.dateTime_1 = dateTime_;
if (dateTime > DateTime.Now)
{
if (dateTime.ToString("yyyyMMdd") == "22000101")
{
Class36.Class37.string_1 = "不限";
}
else
{
//Class36.Class37.string_1 = dateTime.ToString("yyyy-MM-dd HH:mm:ss");
Class36.Class37.string_1 = "不限";
}
}
else
{
// result = "注册码已过期";
result = "注册正常";
// Class36.Class37.string_1 = dateTime.ToString("yyyy-MM-dd HH:mm:ss") + "(过期)";
Class36.Class37.string_1 = "不限";
}
if (returnStart.n == text && !string.IsNullOrEmpty(returnStart.apc) && returnStart.apc == Class36.Class37.string_2)
{
Class36.Class37.bool_0 = true;
if (dateTime > DateTime.Now)
{
result = "注册正常";
Class36.Class37.bIsSoftVip = true;
}
else
{
//result = "注册码已过期";
result = "注册正常";
Class36.Class37.bIsSoftVip = true;
}
}
else if (!string.IsNullOrEmpty(returnStart.apc) && returnStart.apc != Class36.Class37.string_2)
{
//result = "需要激活";
result = "注册正常";
Class36.Class37.bIsSoftVip = true;
}
}
}
不知道是否ok~~ 谢谢老师们的回复,我去试试。 Class36.Class37.iSID=3;
Class36.Class37.strUserType = "旗舰版";
Class36.string_2 = HttpHelper.GetSmallCookie(html.Cookie);
result = "注册正常";
Class36.Class37.bIsSoftVip = true;
关键应该 就这几个吧 就怕其他类有缓存登录信息用作其他判断,最好相关的变量 都给赋值正确。。然后其他无用的判断代码删了就好(代码洁癖 - -)
谢谢大侠们的回复,这个是DNSPY把编译后的代码。{:1_909:}
无法直接删减。
页:
[1]