.Net x东的简单签到
本帖最后由 cn005897 于 2023-5-11 14:10 编辑只有这两个简单的操作,其它复杂的抽空再研究下 static void Main(string[] args)
{
string pt_key = "123";//cookie中的pt_key参数
string pt_pin = "234";//cookie中的pt_pin参数
string cookie = $"pt_key={pt_key}; pt_pin={pt_pin}";
SignBean(cookie);
CashSign(cookie);
Console.ReadKey();
}
/// <summary>
/// x东签到
/// </summary>
/// <param name="cookie"></param>
/// <param name="userAgent"></param>
static void SignBean(string cookie)
{
string url = "https://api.m.xd.com/client.action?functionId=signBeanAct&body=%7B%22fp%22%3A%22-1%22%2C%22shshshfp%22%3A%22-1%22%2C%22shshshfpa%22%3A%22-1%22%2C%22referUrl%22%3A%22-1%22%2C%22userAgent%22%3A%22-1%22%2C%22jda%22%3A%22-1%22%2C%22rnVersion%22%3A%223.9%22%7D&appid=ld";
SendRequest(url, cookie);
}
/// <summary>
/// 签到领现金
/// </summary>
/// <param name="cookie"></param>
/// <param name="userAgent"></param>
static void CashSign(string cookie)
{
string url = "https://api.m.xd.com/client.action?functionId=cash_sign&body=%7B%22remind%22%3A0%2C%22inviteCode%22%3A%22%22%2C%22type%22%3A0%2C%22breakReward%22%3A0%7D&client=apple&clientVersion=9.0.8&openudid=1fce88cd05c42fe2b054e846f11bdf33f016d676&sign=7e2f8bcec13978a691567257af4fdce9&st=1596954745073&sv=111";
SendRequest(url, cookie);
}
/// <summary>
/// 发送请求
/// </summary>
/// <param name="url"></param>
/// <param name="cookie"></param>
static void SendRequest(string url,string cookie)
{
var request = (HttpWebRequest)WebRequest.Create(url);
request.Method = "POST";
request.ContentType = "application/x-www-form-urlencoded; charset=UTF-8";
request.UserAgent = "okhttp/3.12.1;jdmall;android;version/10.3.4;build/92451";
request.Headers.Add(HttpRequestHeader.Cookie, cookie);
using (var response = (HttpWebResponse)request.GetResponse())
{
using (var stream = response.GetResponseStream())
{
using (var reader = new StreamReader(stream))
{
string result = reader.ReadToEnd();
Console.WriteLine(result);
Console.WriteLine("------------");
}
}
}
}
感谢分享 感谢楼主分享,看错了,我还以为是狗东的签到代码呢 wfghim 发表于 2023-5-11 17:36
感谢楼主分享,看错了,我还以为是狗东的签到代码呢
确实是x东的 谢谢分享,就是不知道还能用多久 青龙面板该怎么用
怎么抓的呢 谢谢分享
页:
[1]