diff --git a/AllBase/BaseClass.cs b/AllBase/BaseClass.cs
index 7cfc74c..fd3b73e 100644
--- a/AllBase/BaseClass.cs
+++ b/AllBase/BaseClass.cs
@@ -27,7 +27,7 @@ namespace AllBase
///
/// 版本ID
///
- public static int VersionCount = 613;
+ public static int VersionCount = 615;
//public static int VersionCount = 613;
///
diff --git a/AllBase/Model/Result/ShopLoginInfo.cs b/AllBase/Model/Result/ShopLoginInfo.cs
index ae8fd91..5b8f151 100644
--- a/AllBase/Model/Result/ShopLoginInfo.cs
+++ b/AllBase/Model/Result/ShopLoginInfo.cs
@@ -31,6 +31,7 @@ namespace AllBase.Model.Result
public string TouTiaoId { get; set; }
public string Cookies { get; set; } = "";
public string Cookies2 { get; set; } = "";
+ public string pddid { get; set; }
public ConcurrentList AntiContents { get; set; } = new ConcurrentList();
public Dictionary DictMultiCookies { get; set; } = new Dictionary();
public string LoginStatus { get; set; }
diff --git a/DllReference/FiddlerCore4.dll b/DllReference/FiddlerCore4.dll
new file mode 100644
index 0000000..bf22ee5
Binary files /dev/null and b/DllReference/FiddlerCore4.dll differ
diff --git a/KJDService/KJD_WebService/BLL/BXX/BXXShopManage.cs b/KJDService/KJD_WebService/BLL/BXX/BXXShopManage.cs
index e334b8e..ea78e5a 100644
--- a/KJDService/KJD_WebService/BLL/BXX/BXXShopManage.cs
+++ b/KJDService/KJD_WebService/BLL/BXX/BXXShopManage.cs
@@ -94,9 +94,9 @@ namespace KJD_Web.BLL.BXX
}
else
{
- sql = "SELECT s.id,s.login_name,s.login_pass,s.cookie,s.cookie2,s.anti_contents,s.shop_id,s.shop_account,s.sub_user_name,s.user_name," +
- "s.company_name,s.notes,s.login_status,s.login_status2,c.add_product_remaining,c.add_product_month,s.add_time,s.mdy_time," +
- "s.add_sub_sa_time,s.operate_sub_sa_name";
+ sql = "SELECT s.id,s.login_name,s.login_pass,s.cookie,s.cookie2,s.anti_contents,s.pddid,s.shop_id,s.shop_account,s.sub_user_name," +
+ "s.user_name,s.company_name,s.notes,s.login_status,s.login_status2,c.add_product_remaining,c.add_product_month," +
+ "s.add_time,s.mdy_time,s.add_sub_sa_time,s.operate_sub_sa_name";
//sql += " FROM bxx.shop s WHERE 1=1";
sql += " FROM bxx.shop s LEFT JOIN bxx.shop_add_prod_count c ON s.shop_id=c.shop_id WHERE 1=1";
@@ -131,8 +131,8 @@ namespace KJD_Web.BLL.BXX
login_status2 = row["login_status2"].ToString(),
add_product_remaining = row["add_product_remaining"].ParseToInt(),
add_product_month = row["add_product_month"].ParseToInt(),
- operate_sub_sa_name = row["operate_sub_sa_name"] as string,
-
+ operate_sub_sa_name = row["operate_sub_sa_name"].ParseToString(),
+ pddid = row["pddid"].ParseToString(),
};
shopList.Add(shop);
}
@@ -683,6 +683,7 @@ namespace KJD_Web.BLL.BXX
string cookie2 = RegexUtils.GetStringQuery(ref inputData, "cookie2");
string login_status = HtmlUtils.UrlDecodeUtf8(RegexUtils.GetStringQuery(ref inputData, "login_status"));
string login_status2 = HtmlUtils.UrlDecodeUtf8(RegexUtils.GetStringQuery(ref inputData, "login_status2"));
+ string pddid = HtmlUtils.UrlDecodeUtf8(RegexUtils.GetStringQuery(ref inputData, "pddid"));
int r2 = 0;
int.TryParse(RegexUtils.GetStringQuery(ref inputData, "r2"), out r2);
@@ -703,6 +704,8 @@ namespace KJD_Web.BLL.BXX
sql += " login_status='" + login_status + "',";
if (login_status2 != null)
sql += " login_status2='" + login_status2 + "',";
+ if (pddid != null)
+ sql += " pddid='" + pddid + "',";
sql = sql.TrimEnd(',');
sql += " where login_name='" + login_name + "'";
diff --git a/KJDService/KJD_WebService/Model/ShopModel/ShopParam.cs b/KJDService/KJD_WebService/Model/ShopModel/ShopParam.cs
index 3a5b888..a1bbc62 100644
--- a/KJDService/KJD_WebService/Model/ShopModel/ShopParam.cs
+++ b/KJDService/KJD_WebService/Model/ShopModel/ShopParam.cs
@@ -13,6 +13,7 @@ namespace KJD_Web.Model.ShopModel
public string cookie { get; set; }
public string cookie2 { get; set; }
public string anti_contents { get; set; }
+ public string pddid { get; set; }
public string shop_id { get; set; }
public string shop_account { get; set; }
public string sub_user_name { get; set; }
diff --git a/TEMUKJD/BLL/HttpResponseBLL.cs b/TEMUKJD/BLL/HttpResponseBLL.cs
index 6620a0d..efd299a 100644
--- a/TEMUKJD/BLL/HttpResponseBLL.cs
+++ b/TEMUKJD/BLL/HttpResponseBLL.cs
@@ -331,6 +331,13 @@ namespace TemuKJD.BLL
request.Headers.Add("Anti-Content", AntiContent);
request.Headers.Add("sec-ch-ua-platform", @"""Windows""");
request.UserAgent = "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/139.0.0.0 Safari/537.36";
+ if (cookies.Contains("PASS_ID=windows") && !string.IsNullOrEmpty(shop.pddid))
+ {
+ request.UserAgent = "Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/75.5.40.8 Safari/537.36 PddWorkbench-Online PddBrowser pdd_windows_version/3.0.3.12";
+ //request.UserAgent = "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/139.0.0.0 Safari/537.36 PddWorkbench-Online PddBrowser pdd_windows_version/3.0.3.12";
+ //request.Headers.Add("pddid", @"zULm8bXS");
+ request.Headers.Add("pddid", shop.pddid);
+ }
request.Headers.Add("ETag", rckk);
request.Headers.Add("sec-ch-ua", @"""Not;A=Brand"";v=""99"", ""Google Chrome"";v=""139"", ""Chromium"";v=""139""");
request.ContentType = "application/json";
@@ -409,6 +416,13 @@ namespace TemuKJD.BLL
request.Headers.Add("Anti-Content", AntiContent);
request.Headers.Add("sec-ch-ua-platform", @"""Windows""");
request.UserAgent = "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/139.0.0.0 Safari/537.36";
+ if (cookies.Contains("PASS_ID=windows") && !string.IsNullOrEmpty(shop.pddid))
+ {
+ request.UserAgent = "Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/75.5.40.8 Safari/537.36 PddWorkbench-Online PddBrowser pdd_windows_version/3.0.3.12";
+ //request.UserAgent = "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/139.0.0.0 Safari/537.36 PddWorkbench-Online PddBrowser pdd_windows_version/3.0.3.12";
+ //request.Headers.Add("pddid", @"zULm8bXS");
+ request.Headers.Add("pddid", shop.pddid);
+ }
request.Headers.Add("ETag", rckk);
request.Headers.Add("sec-ch-ua", @"""Not;A=Brand"";v=""99"", ""Google Chrome"";v=""139"", ""Chromium"";v=""139""");
request.Headers.Add("sec-ch-ua-mobile", @"?0");
@@ -473,6 +487,13 @@ namespace TemuKJD.BLL
request.Headers.Set(HttpRequestHeader.CacheControl, "max-age=0");
request.Headers.Add("sec-ch-ua-platform", @"""Windows""");
request.UserAgent = "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/139.0.0.0 Safari/537.36";
+ if (cookies.Contains("PASS_ID=windows") && !string.IsNullOrEmpty(shop.pddid))
+ {
+ request.UserAgent = "Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/75.5.40.8 Safari/537.36 PddWorkbench-Online PddBrowser pdd_windows_version/3.0.3.12";
+ //request.UserAgent = "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/139.0.0.0 Safari/537.36 PddWorkbench-Online PddBrowser pdd_windows_version/3.0.3.12";
+ //request.Headers.Add("pddid", @"zULm8bXS");
+ request.Headers.Add("pddid", shop.pddid);
+ }
request.Headers.Add("ETag", rckk);
request.Headers.Add("sec-ch-ua", @"""Not;A=Brand"";v=""99"", ""Google Chrome"";v=""139"", ""Chromium"";v=""139""");
request.ContentType = "multipart/form-data; boundary=" + boundary;
diff --git a/TEMUKJD/BLL/MemoryReader.cs b/TEMUKJD/BLL/MemoryReader.cs
new file mode 100644
index 0000000..4297c1c
--- /dev/null
+++ b/TEMUKJD/BLL/MemoryReader.cs
@@ -0,0 +1,78 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Runtime.InteropServices;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace TemuKJD.BLL
+{
+ public class MemoryReader
+ {
+ [DllImport("kernel32.dll")]
+ public static extern IntPtr OpenProcess(int dwDesiredAccess, bool bInheritHandle, int dwProcessId);
+
+ [DllImport("kernel32.dll", SetLastError = true)]
+ [return: MarshalAs(UnmanagedType.Bool)]
+ public static extern bool ReadProcessMemory(IntPtr hProcess, IntPtr lpBaseAddress, byte[] lpBuffer, uint nSize, out uint lpNumberOfBytesRead);
+
+ [DllImport("kernel32.dll", SetLastError = true)]
+ [return: MarshalAs(UnmanagedType.Bool)]
+ public static extern bool WriteProcessMemory(IntPtr hProcess, IntPtr lpBaseAddress, byte[] lpBuffer, uint nSize, out uint lpNumberOfBytesWritten);
+
+ [DllImport("kernel32.dll")]
+ public static extern bool CloseHandle(IntPtr hObject);
+
+ // 声明GetLastError函数
+ [DllImport("kernel32.dll")]
+ private static extern int GetLastError();
+
+ const int PROCESS_WM_READ = 0x0010;
+ const int PROCESS_WM_WRITE = 0x0020;
+ const int PROCESS_WM_ALL = 0x003F;
+ const int PROCESS_ALL_ACCESS = 0x1F0FFF;
+
+ public static void ReadMemory(int nProcess, int nAddress, int nReadSize)
+ {
+ int processId = nProcess; // 目标进程ID
+ //IntPtr hProcess = OpenProcess(PROCESS_WM_READ | PROCESS_WM_WRITE, false, processId);
+ IntPtr hProcess = OpenProcess(PROCESS_ALL_ACCESS, false, processId);
+ if (hProcess == IntPtr.Zero)
+ {
+ int errorCode = GetLastError();
+ //Console.WriteLine("Process access failed.");
+ BaseForms.BaseMsgForm.ShowError("Process access failed.");
+ return;
+ }
+
+ int endAddress = nAddress + nReadSize;
+ while (nAddress < endAddress)
+ {
+ IntPtr address = new IntPtr(nAddress); // 目标内存地址
+ byte[] buffer = new byte[1024]; // 读取数据的缓冲区
+ uint bytesRead;
+ if (ReadProcessMemory(hProcess, address, buffer, (uint)buffer.Length, out bytesRead))
+ {
+ //Console.WriteLine("Read successful.");
+ string s = System.Text.Encoding.Default.GetString(buffer);
+ if (s.Contains("pddidResult"))
+ {
+
+ }
+ }
+ else
+ {
+ //Console.WriteLine("Read failed.");
+ // 获取最后一个错误代码
+ int errorCode = GetLastError();
+ //Console.WriteLine("Error code: " + errorCode);
+ // 将错误代码转换为异常(可选)
+ Exception ex = Marshal.GetExceptionForHR(errorCode);
+ //BaseForms.BaseMsgForm.ShowError(ex.Message);
+ }
+ nAddress += 1000;
+ }
+ //CloseHandle(hProcess);
+ }
+ }
+}
diff --git a/TEMUKJD/BLL/ShopBLL.cs b/TEMUKJD/BLL/ShopBLL.cs
index 6fc9b2b..bd508f1 100644
--- a/TEMUKJD/BLL/ShopBLL.cs
+++ b/TEMUKJD/BLL/ShopBLL.cs
@@ -242,6 +242,7 @@ namespace TemuKJD.BLL
shop.LoginStatus2 = BaseRegex.GetStringJson(ref shopStr, "login_status2");
shop.OperateSubSaName = BaseRegex.GetStringJson(ref shopStr, "operate_sub_sa_name");
shop.AddProductRemaining = BaseRegex.GetIntJson(ref shopStr, "add_product_remaining");
+ shop.pddid = BaseRegex.GetStringJson(ref shopStr, "pddid");
if (BaseClass.MainPath == "binxixi")
{
diff --git a/TEMUKJD/Helper/CustomResourceRequestHandlerLocal.cs b/TEMUKJD/Helper/CustomResourceRequestHandlerLocal.cs
index 8cc0163..6987584 100644
--- a/TEMUKJD/Helper/CustomResourceRequestHandlerLocal.cs
+++ b/TEMUKJD/Helper/CustomResourceRequestHandlerLocal.cs
@@ -23,7 +23,7 @@ namespace TemuKJD.Helper
public class BaseResourceRequestHandler : ResourceRequestHandler
{
public string UserAgent = string.Empty;
- public Func