【开源软件】一个自己写的 i茅台 预约软件
bin/debug目录里有编译好的exe,可以直接用。1. 自己写了验证码登录、预约功能,登录的数据可保存。下次登录软件就不用在验证码登录了,直到这个cookie过期。
2. 需要自己把要抢的个人信息先做个配置在userconfig.json,第一次使用费力点,但以后就不用了。
{
"data": [{
"mobile": "13511111111", #手机号码样例
"shopIds": "100330100004@133330100001@100330100002@133330100002@22330100025001@133330121002", #自己身边的茅台店id 优先级从左到右,由高到低
"province": "浙江省",
"deviceId": "21EC2020-3AEA-1069-A2DD-08002B30309D", #设备id网上可以搜索或者自己生成,说白了就guid的随机码,不知道有没有影响,不同肯定好点
"productIds":"10941@10942", ##需要抢的产品代码
"params":"MT-K:1695430951361@MT-Lng:121.231099@MT-Lat:31.272769"##经纬度
}
]
}
注:不喜欢的请别下载,下载了觉得不好的请别抱怨,特别是吹毛求疵的朋友还是不要下为好。觉得好的点个赞、评个分,尊重一下别人的劳动成果。下一步开发自动预约的。
主要功能代码如下:
/// <summary>
/// 发送验证码
/// </summary>
/// <returns></returns>
public string RequestCode()
{
System.DateTime startTime = TimeZone.CurrentTimeZone.ToLocalTime(new System.DateTime(1970, 1, 1, 0, 0, 0, 0));
long t = (DateTime.Now.Ticks - startTime.Ticks) / 10000;
var timestamp = t;
JObject param = new JObject{
{ "mobile", this.UserName },
{ "md5", Signature(this.UserName,timestamp) },
{"timestamp",timestamp+""}
};
string string_ = param.ToString();
//Hashtable headers = new Hashtable();
//headers.Add("firmId","82610");
this.request.DeviceId = GetDeviceId(this.UserName);
string result = this.request.RequestCode("https://app.moutai519.com.cn/xhr/front/user/register/vcode", null, string_);
var jObject = JObject.Parse(result);
if (jObject.GetValue("code").Value<int>() != 2000)
{
throw new InvalidOperationException("发送验证码失败:" + result);
}
return result;
}
public string Login()
{
JObject param = new JObject{
{ "mobile", this.UserName },
{ "ydToken", "" },
{"vCode",this.Code},
{"ydLogId",""}
};
string string_ = param.ToString();
this.request.DeviceId = GetDeviceId(this.UserName);
string result = this.request.RequestCode("https://app.moutai519.com.cn/xhr/front/user/register/login", null, string_);
var jObject = JObject.Parse(result);
if (jObject.GetValue("code").Value<int>() != 2000)
{
throw new InvalidOperationException("登录失败:" + result);
}
return result;
}
public RResponse Reservation(UserEntity user, string itemId, string shopId)
{
var info = new Dictionary<string, object>
{
{ "itemId", itemId },
{ "count", 1 }
};
var values = new Dictionary<string, object>
{
{ "itemInfoList", new List<Dictionary<string, object>>() { info } },
{ "sessionId", this.request.Session},
{"shopId",shopId},
{"userId",user.UserId + ""}
};
Hashtable headers = new Hashtable();
headers.Add("MT-Token", user.Token);
headers.Add("userId", user.UserId.ToString());
values.Add("actParam", EncryptAES_CBC(JsonConvert.SerializeObject(values).Replace("\\\"", "\"")));
var requestBody = JsonConvert.SerializeObject(values);
System.Console.WriteLine(requestBody);
// string string_ = param.ToString();
this.request.DeviceId = GetDeviceId(user.Mobile);
string result = this.request.RequestCode("https://app.moutai519.com.cn/xhr/front/mall/reservation/add", headers, requestBody);
System.Console.WriteLine(result);
var jObject = JObject.Parse(result);
if (jObject.GetValue("code").Value<int>() == 2000)
{
var dataJObject = jObject["data"];
return new RResponse()
{
Code = jObject.GetValue("code").Value<int>(),
Message = dataJObject["successDesc"].Value<string>()
};
}
else {
return new RResponse()
{
Code = jObject.GetValue("code").Value<int>(),
Message = jObject.GetValue("message").Value<string>()
};
}
} 2024-05-28 17:10:41.4880 ConsoleApp3.Program.Main(:0) - 成功导入配置的其他用户信息!
2024-05-28 17:10:41.4880 ConsoleApp3.Program.Main(:0) - ############################################
2024-05-28 17:10:41.4880 ConsoleApp3.Program.Main(:0) - 开始预约................
预约请求返回的结果: {"message":" device id inconsistency","code":4011}
2024-05-28 17:10:41.8612 ConsoleApp3.OperationManager.Reserve(:0) - Reserve device id inconsistency].
预约请求返回的结果: {"message":" device id inconsistency","code":4011}
2024-05-28 17:10:42.1398 ConsoleApp3.OperationManager.Reserve(:0) - Reserve device id inconsistency].
2024-05-28 17:10:42.1398 ConsoleApp3.Program.Main(:0) - 预约完成!
2024-05-28 17:10:42.1398 ConsoleApp3.Program.Main(:0) - ############################################
2024-05-28 17:10:42.1398 ConsoleApp3.Program.Main(:0) - 开始获取预约后的游戏积分!
{"message":" device id inconsistency","code":4011}
2024-05-28 17:10:42.4955 ConsoleApp3.OperationManager.GetUserEnergyAward(:0) - {"message":" device id inconsistency","code":4011}
2024-05-28 17:10:42.4955 ConsoleApp3.Program.Main(:0) - 获取预约后的游戏积分成功!
2024-05-28 17:10:42.4955 ConsoleApp3.Program.Main(:0) - ############################################
2024-05-28 17:10:42.4955 ConsoleApp3.Program.Main(:0) - ############################################
2024-05-28 17:10:42.4955 ConsoleApp3.Program.Main(:0) - 开始获取小茅运!
2024-05-28 17:10:42.5834 ConsoleApp3.OperationManager.GetUserRewward(:0) - [ 17795036213 ] 获取7天小茅运奖励,返回数据是:
2024-05-28 17:10:42.6692 ConsoleApp3.OperationManager.GetUserRewward(:0) - [ 17795036213 ] 获取小茅运奖励,返回 数据是:
2024-05-28 17:10:42.6692 ConsoleApp3.Program.Main(:0) - 获取小茅运成功!
2024-05-28 17:10:42.6692 ConsoleApp3.Program.Main(:0) - ############################################
搞了好久 还是不行,设备id验证不通过 自动挂的不错诶,已经很久没有预约了 不错。试下看能预约到不 本帖最后由 moneyjin 于 2024-5-10 07:48 编辑
谢谢分享!是用来预约那个撸羊毛的茅台酒平台吗,比如贵旅优品、空港乐购、乐旅商城等一些平台吗
查了下,是用来预约茅台官方APPi茅台的 抢茅台是个技术活儿:lol 怎么查经纬度以及茅台店ID啊 感谢分享,但现在茅台已经赚不到钱了啊 不错,眼熟的C# 感谢分享,准备看看京东和天猫的 jubaicc 发表于 2024-5-10 08:50
感谢分享,准备看看京东和天猫的
我曾经在天猫中过 原价转给朋友了