步步为盈
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

76 lines
2.8 KiB

2 years ago
using Jd.ACES;
using Jd.Api;
using Jd.Api.Request;
using Newtonsoft.Json;
3 years ago
using Newtonsoft.Json.Linq;
using System;
3 years ago
using System.Collections.Generic;
using System.Linq;
2 years ago
using System.Net.Http;
using System.Security.Cryptography;
using System.Text;
3 years ago
namespace BBWY.Test
{
internal class Program
{
3 years ago
private static IJdClient GetJdClient(string appKey, string appSecret)
{
return new DefaultJdClient("https://api.jd.com/routerjson", appKey, appSecret);
}
2 years ago
public static string Md5Encrypt(string originStr)
{
using (var md5 = MD5.Create())
{
return string.Join(string.Empty, md5.ComputeHash(Encoding.UTF8.GetBytes(originStr)).Select(x => x.ToString("x2")));
}
}
static void Main(string[] args)
{
2 years ago
2 years ago
//var appkey = "E1AA9247D5583A6D87449CE6AB290185";
//var appSecret = "e479558ddd9e40f8929cfc00c6cbbc9c";
var appkey = "120EA9EC65AB017567D78CC1139EEEA5";
var appSecret = "8a42bc2301e8439b896e99f5475e0a9b";
3 years ago
////0e61c4a8ec3e4df4b5836e10884db9220yth 齐盛
2 years ago
var token = "2ace3023200c4ea9aa682bbf8bffee18jztm"; //布莱特玩具
2 years ago
//var token = "01f5be2cb4d741dda66bce2356941597mdfm"; //布莱特玩具 token2
//var token = "01dc6f6e7fc34dcd99090d690312556cmdfk"; //齐盛
//var token = "9fffa982da23446fb035499ae5622f49odjk"; //腾奇
//var token = "c22ff4d37b6c4bbd82cd9e8d0dab42dbziyz"; //森王车品
//var token = "44c19a1c1fbd4641957e6e8985ed1358jmtl"; //森王玩具
2 years ago
//var token = "4a0ddc095e054c7aa90adcaccb14f83cwzgr"; //可比车品
2 years ago
//var dt1 = DateTime.Now;
//List<string> list = new List<string>();
//for (var i = 1; i <= 5000000; i++)
//{
// var str = tomMd5($"Mozilla/5.0 (Linux; Android 12; 21121210C Build/SKQ1.211006.001; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/76.0.3809.89 Mobile Safari/537.36 T7/13.8 SP-engine/2.46.0 baiduboxapp/13.8.1.10 (Baidu; P1 12) NABar/1.0 Edg/102.0.5005.63_{i}_192.158.241.{i}_28726526517321");
// Console.WriteLine($"生成第{i}位指纹,长度{str.Length},{str}");
// list.Add(str);
//}
//var dt2 = DateTime.Now;
//Console.WriteLine($"总数量{list.Count},总耗时{(dt2 - dt1).TotalSeconds}秒");
2 years ago
var jdClient = GetJdClient(appkey, appSecret);
2 years ago
Console.ReadKey();
}
2 years ago
static string tomMd5(string str)
{
using (var md5 = MD5.Create())
{
return string.Join(string.Empty, md5.ComputeHash(Encoding.UTF8.GetBytes(str)).Select(x => x.ToString("x2")));
}
}
}
}