{"id":1873,"date":"2023-08-01T22:29:31","date_gmt":"2023-08-01T14:29:31","guid":{"rendered":"https:\/\/www.pigquant.com\/?p=1873"},"modified":"2023-08-01T22:30:56","modified_gmt":"2023-08-01T14:30:56","slug":"%e6%9f%90%e7%9f%ad%e7%ba%bf%e7%b2%be%e7%81%b5%e5%8d%8f%e8%ae%ae%e7%9a%84%e7%9b%91%e6%8e%a7%e5%ae%9e%e7%8e%b0","status":"publish","type":"post","link":"https:\/\/www.pigquant.com\/?p=1873","title":{"rendered":"\u67d0\u77ed\u7ebf\u7cbe\u7075\u534f\u8bae\u7684\u76d1\u63a7\u5b9e\u73b0"},"content":{"rendered":"\n<p>\u53d1\u4e2a\u524d\u5e74\u5199\u7684\u77ed\u7ebf\u7cbe\u7075\u534f\u8bae\u9006\u5411\u7684\u4ee3\u7801\uff0cHook\u7684recv\u51fd\u6570\uff0c\u7136\u540e\u76d1\u63a7\u6bcf\u4e2a\u6570\u636e\u5305\u7ed3\u6784\uff0c\u53ef\u4ee5\u901a\u8fc7\u8be5\u65b9\u6cd5\u5b9e\u73b0\u6240\u6709\u5ba2\u6237\u7aef\u529f\u80fd\u5427\u3002\u6570\u636e\u5305\u7ed3\u6784\u786e\u5b9e\u9006\u5411\u82b1\u4e86\u51e0\u5929\u65f6\u95f4\uff0c\u8fd8\u662f\u7b80\u5355\u7684\u3002\u987a\u4fbf\u5165\u95e8\u4e86\u4e00\u4e0bVC++\uff0c\u8fd8\u6d4b\u8bd5\u4e86\u4e00\u4e0b\u8c03\u7528python\u4ee3\u7801\uff0c\u597d\u50cf\u4e0d\u80fd\u591a\u7ebf\u7a0b\u8c03\u7528\u5c31\u653e\u5f03\u4e86\u3002\u5199\u8fc7\u7684\u4e1c\u897f\u592a\u591a\u4e86\uff0c\u8fd9\u53ea\u662f\u4e2a\u5c0f\u4f8b\u5b50\u3002<\/p>\n\n\n\n<p>\u6548\u679c\u7684\u8bdd\uff0c\u5927\u6982\u5c31\u662f\u8fd9\u6837\uff0c\u53ef\u4ee5\u52a0\u5165\u4e00\u4e9b\u80a1\u6c60\u6765\u89e6\u53d1\u81ea\u52a8\u6253\u677f\uff0c\u8fd9\u91cc\u89e6\u53d1\u76d1\u63a7\u6761\u4ef6\u540e\uff0c\u901a\u8fc7WEB\u8bf7\u6c42\u4e1c\u65b9\u8d22\u5bcc\u63a5\u53e3\u83b7\u53d6\u8d44\u91d1\u4fe1\u606f\u8fdb\u884c\u4e8c\u6b21\u5224\u65ad\u3002<\/p>\n\n\n\n<figure class=\"wp-block-image size-full is-resized\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.pigquant.com\/wp-content\/uploads\/2023\/08\/image-4.png\" alt=\"\" class=\"wp-image-1874\" width=\"582\" height=\"657\" srcset=\"https:\/\/www.pigquant.com\/wp-content\/uploads\/2023\/08\/image-4.png 669w, https:\/\/www.pigquant.com\/wp-content\/uploads\/2023\/08\/image-4-266x300.png 266w\" sizes=\"auto, (max-width: 582px) 100vw, 582px\" \/><\/figure>\n\n\n\n<pre class=\"wp-block-code\"><code>#include \"pch.h\"\n\n#include &lt;cstdio&gt;\n#include &lt;ctime&gt;\n#include &lt;iomanip&gt;\n#include &lt;string&gt;\n#include &lt;windows.h&gt;\n#include &lt;iostream&gt;\n#include &lt;winsock.h&gt;\n#include &lt;WinInet.h&gt;\n#include &lt;map&gt;\n#include &lt;time.h&gt;\n#include &lt;fstream&gt;\n\n#include \"detours.h\"\n#include \"configor\/json.hpp\"\n\n#pragma comment(lib,\"ws2_32.lib\")\n#pragma comment (lib, \"wininet.lib\")\n#pragma comment (lib, \"detours.lib\")\n\nusing namespace std;\nusing namespace configor;\n\n\n\n\n\n\n\/\/ \u591a\u7ebf\u7a0b\u53c2\u6570\u7528\u5230\u7684\u7ed3\u6784\nstruct stock_info\n{\n\tchar time&#91;10];\n\tchar stock&#91;10];\n\tint type;\n\tchar num&#91;20];\n};\n\n\n\n\nHANDLE g_hFile;\nHANDLE g_hFile2;\nSYSTEMTIME systm;\nmap&lt;DWORD, string&gt; msg_type_map;\nvector&lt;string&gt;stock_list;\nstring follow_type_list&#91;] = { \"\u5927\u7b14\u4e70\u5165\", \"\u5355\u7b14\u51b2\u6da8\", \"\u6025\u901f\u62c9\u5347\", \"\u903c\u8fd1\u6da8\u505c\", \"\u533a\u95f4\u653e\u91cf\u6da8\", \"\u533a\u95f4\u653e\u91cf\u5e73\",\"\u6253\u5f00\u8dcc\u505c\u677f\", \"\u6253\u5f00\u6da8\u505c\u677f\", \"\u5c01\u6da8\u505c\u677f\", \"\u6da8\u505c\u5927\u51cf\", \"\u8dcc\u505c\u5927\u51cf\", \"\u5f3a\u52bf\u5c01\u6da8\u505c\" };\nchar g_get_host&#91;] = { \"push2.eastmoney.com\" };\nchar g_stock_dd&#91;] = { \"\/api\/qt\/ulist.np\/get?&amp;fltt=2&amp;secids=%s&amp;fields=f62,f184&amp;_=%d\" };\nchar g_stock_info_url&#91;] = { \"\/api\/qt\/stock\/get?&amp;fltt=2&amp;secid=%s&amp;fields=f58,f168,f170&amp;_=%d\" };\nsize_t follow_type_size = sizeof(follow_type_list) \/ sizeof(follow_type_list&#91;0]);\n\nint (WINAPI* pRecv)(SOCKET s, char* buf, int len, int flags) = recv;\nint (WINAPI* pSend)(SOCKET s, const char* buf, int len, int flags) = send;\n\n\nint WINAPI MySend(SOCKET s, const char* buf, int len, int flags);\nint WINAPI MyRecv(SOCKET s, char* buf, int len, int flags);\nstring HttpRequest(string site, string param);\nvoid InitConsoleWindows();\nvoid IsFileExist(const char* csFile);\nvoid write_file(HANDLE hfile, const char* type_str, const char* time, const char* stock, const char* info);\nvoid get_url_info(const char* stock, const char* args, string&amp; out);\nvoid pymain(const char* time, const char* stock, int type_id, const char* num);\nDWORD WINAPI SaveStockInfoThread(LPVOID lpargs);\nVOID PrintHex(PBYTE Data, ULONG dwBytes);\nvoid DbgPrintA(LPCSTR lpszFormat, ...);\nint htoi(char s&#91;]);\nchar* UtfToGbk(const char* utf8);\nvoid get_stock_info(const char* stock, int type_id, string&amp; str_args1, float&amp; f_args2);\nvoid get_stock_dd(const char* stock, int type_id, float&amp; f_args1, float&amp; f_args2);\nvoid write_file_close(const char* filename, const char* write_buf);\nvoid read_stocks();\nbool search_buy_stock(const char* stock);\nDWORD WINAPI Mod1Thread(LPVOID lpargs);\n\n\n\ntemplate&lt;typename ... Args&gt;\nstatic std::string str_format(const std::string&amp; format, Args ... args)\n{\n\tauto size_buf = std::snprintf(nullptr, 0, format.c_str(), args ...) + 1;\n\tstd::unique_ptr&lt;char&#91;]&gt; buf(new(std::nothrow) char&#91;size_buf]);\n\n\tif (!buf)\n\t\treturn std::string(\"\");\n\n\tstd::snprintf(buf.get(), size_buf, format.c_str(), args ...);\n\treturn std::string(buf.get(), buf.get() + size_buf - 1);\n}\n\n\n\n\/\/ \u83b7\u53d6\u4e3b\u529b\u8d44\u91d1\nvoid get_stock_dd(const char* stock, int type_id, float&amp; f_args1, float&amp; f_args2) {\n\ttry {\n\t\t\/\/ \u83b7\u53d6\u80a1\u7968\u4fe1\u606f\n\t\tstring out_json;\n\t\tjson json_info;\n\t\tget_url_info(stock, g_stock_dd, out_json);\n\t\tjson_info = json::parse(out_json.c_str());\n\t\tf_args2 = json_info&#91;\"data\"]&#91;\"diff\"]&#91;0]&#91;\"f62\"].get&lt;float&gt;();\n\t\tf_args1 = json_info&#91;\"data\"]&#91;\"diff\"]&#91;0]&#91;\"f184\"].get&lt;float&gt;();\n\t}\n\tcatch (...) {\n\t\tcout &lt;&lt; \"get_stock_dd() catch (...)\\r\\n\" &lt;&lt; endl;\n\t\tf_args1 = 0.0;\n\t\tf_args2 = 0.0;\n\t}\n}\n\n\n\n\/\/ \u83b7\u53d6\u80a1\u7968\u4fe1\u606f\nvoid get_stock_info(const char* stock, int type_id, string&amp; str_args1, float&amp; f_args2) {\n\ttry {\n\t\t\/\/ \u83b7\u53d6\u80a1\u7968\u4fe1\u606f\n\t\tstring out_json;\n\t\tstring stock_info = \"\";\n\t\tjson json_info;\n\n\t\tget_url_info(stock, g_stock_info_url, out_json);\n\t\tjson_info = json::parse(out_json.c_str());\n\t\tstring rname = json_info&#91;\"data\"]&#91;\"f58\"].get&lt;string&gt;();\n\t\tstr_args1 = UtfToGbk(rname.c_str());\n\t\tf_args2 = json_info&#91;\"data\"]&#91;\"f170\"].get&lt;float&gt;();\n\t}\n\tcatch (...) {\n\t\tcout &lt;&lt; \"get_stock_info() catch (...)\\r\\n\" &lt;&lt; endl;\n\t\tstr_args1 = \"\";\n\t\tf_args2 = 0.0;\n\t}\n}\n\n\nvoid read_stocks() {\n\t\/\/ \u83b7\u53d6\u80a1\u7968\u5217\u8868\n\tstring out_json;\n\tjson json_stock;\n\tstd::ifstream ifs(\"test.json\");\n\tif (!ifs.is_open())\n\t{\n\t\tstd::cout &lt;&lt; \"Open json file failed!\" &lt;&lt; std::endl;\n\t\treturn;\n\t}\n\n\tifs &gt;&gt; json_stock;\n\t\/\/ \u4f7f\u7528\u8fed\u4ee3\u5668\u904d\u5386\n\tfor (auto iter = json_stock.begin(); iter != json_stock.end(); iter++) {\n\t\tstock_list.push_back(iter.value().as_string());\n\t\t\/\/std::cout &lt;&lt; iter.value().as_string() &lt;&lt; \"\\r\\n\";\n\t}\n\treturn;\n}\n\n\n\nbool search_buy_stock(const char* stock) {\n\tif (std::find(stock_list.begin(), stock_list.end(), stock) != stock_list.end())\n\t{\n\t\t\/\/cout &lt;&lt; \"\u5b58\u5728\\r\\n\";\n\t\treturn true;\n\t}\n\treturn false;\n\n}\n\nvoid my_init(const char* file_name, const char* file_name2) {\n\tmsg_type_map&#91;0x40080cd1] = \"\u533a\u95f4\u653e\u91cf\u6da8\";\n\tmsg_type_map&#91;0x40080cd2] = \"\u533a\u95f4\u653e\u91cf\u8dcc\";\n\tmsg_type_map&#91;0x40080cd3] = \"\u533a\u95f4\u653e\u91cf\u5e73\";\n\tmsg_type_map&#91;0x40080cd4] = \"\u5355\u7b14\u51b2\u6da8\";\n\tmsg_type_map&#91;0x40080cd5] = \"\u5355\u7b14\u51b2\u8dcc\";\n\tmsg_type_map&#91;0x40080cd6] = \"\u5927\u7b14\u4e70\u5165\";\n\tmsg_type_map&#91;0x40080cd7] = \"\u5927\u7b14\u5356\u51fa\";\n\tmsg_type_map&#91;0x40080cd8] = \"\u5c01\u6da8\u505c\u677f\";\n\tmsg_type_map&#91;0x40080cd9] = \"\u6253\u5f00\u6da8\u505c\u677f\";\n\tmsg_type_map&#91;0x40080cda] = \"\u5c01\u8dcc\u505c\u677f\";\n\tmsg_type_map&#91;0x40080cdb] = \"\u6253\u5f00\u8dcc\u505c\u677f\";\n\tmsg_type_map&#91;0x40080cdc] = \"\u6025\u901f\u62c9\u5347\";\n\tmsg_type_map&#91;0x40080cdd] = \"\u731b\u70c8\u6253\u538b\";\n\tmsg_type_map&#91;0x40080cde] = \"\u6da8\u5e45\u8d85\u8fc710%\u7684\u6574\u6570\u500d\";\n\tmsg_type_map&#91;0x40080cdf] = \"\u6da8\u5e45\u8d85\u8fc710%\u7684\u6574\u6570\u500d\u901f\";\n\tmsg_type_map&#91;0x40080ce0] = \"\u903c\u8fd1\u6da8\u505c\";\n\tmsg_type_map&#91;0x40080ce1] = \"\u903c\u8fd1\u8dcc\u505c\";\n\tmsg_type_map&#91;0x40080ce2] = \"\u6da8\u505c\u5927\u51cf\";\n\tmsg_type_map&#91;0x40080ce3] = \"\u8dcc\u505c\u5927\u51cf\";\n\tmsg_type_map&#91;0x40080ce4] = \"\u5f3a\u52bf\u5c01\u6da8\u505c\";\n\tmsg_type_map&#91;0x40080ce5] = \"\u7ade\u4ef7\u51b2\u6da8\";\n\tmsg_type_map&#91;0x40080ce6] = \"\u7ade\u4ef7\u4e0b\u8dcc\";\n\tmsg_type_map&#91;0x40080ce7] = \"\u4e70\u4e00\u5269\u4f59\u5927\";\n\tmsg_type_map&#91;0x40080ce8] = \"\u5356\u4e00\u5269\u4f59\u5927\";\n\tmsg_type_map&#91;0x40080ce9] = \"\u6da8\u505c\u8bd5\u76d8\";\n\tmsg_type_map&#91;0x40080cea] = \"\u8dcc\u505c\u8bd5\u76d8\";\n\tmsg_type_map&#91;0x40080ceb] = \"\u7ade\u4ef7\u62a2\u7b79\";\n\tmsg_type_map&#91;0x40080cec] = \"\u7ade\u4ef7\u7838\u76d8\";\n\tmsg_type_map&#91;0x40080ced] = \"\u7ade\u4ef7\u5927\u4e70\u8bd5\u76d8\";\n\tmsg_type_map&#91;0x40080cee] = \"\u5f3a\u52bf\u5c01\u8dcc\u505c\";\n\tmsg_type_map&#91;0x40080cef] = \"\u6025\u901f\u62c9\u5347\";\n\tmsg_type_map&#91;0x40080cf0] = \"\u6025\u901f\u62c9\u5347\";\n\tmsg_type_map&#91;0x40080cf1] = \"\u6025\u901f\u62c9\u5347\";\n\tmsg_type_map&#91;0x40080cf2] = \"\u6025\u901f\u62c9\u5347\";\n\tmsg_type_map&#91;0x40080cf3] = \"\u6025\u901f\u62c9\u5347\";\n\tmsg_type_map&#91;0x40080cf4] = \"\u731b\u70c8\u6253\u538b\";\n\tmsg_type_map&#91;0x40080cf5] = \"\u731b\u70c8\u6253\u538b\";\n\tmsg_type_map&#91;0x40080cf6] = \"\u731b\u70c8\u6253\u538b\";\n\tmsg_type_map&#91;0x40080cf7] = \"\u731b\u70c8\u6253\u538b\";\n\tmsg_type_map&#91;0x40080cf8] = \"\u731b\u70c8\u6253\u538b\";\n\tmsg_type_map&#91;0x40080cf9] = \"\u4e3b\u529b\u6025\u5165\";\n\tmsg_type_map&#91;0x40080cfa] = \"\u4e3b\u529b\u6025\u51fa\";\n\tmsg_type_map&#91;0x40080cfb] = \"\u6025\u901f\u4e0a\u6da8\";\n\tmsg_type_map&#91;0x40080cfc] = \"\u731b\u70c8\u4e0b\u8dcc\";\n\n\t\/\/ 2.\u521d\u59cb\u5316\u4e92\u65a5\u91cf\n\t\/\/InitializeCriticalSection(&amp;g_cs);\n\t\/\/ \u68c0\u6d4b\u662f\u5426\u5b58\u5728\n\tIsFileExist(file_name);\n\tIsFileExist(file_name2);\n\t\/\/ \u6253\u5f00\u6587\u4ef6\n\tg_hFile = ::CreateFileA(file_name, GENERIC_READ | GENERIC_WRITE, FILE_SHARE_READ | FILE_SHARE_WRITE, NULL, OPEN_EXISTING,\n\t\tFILE_ATTRIBUTE_NORMAL | FILE_FLAG_BACKUP_SEMANTICS, NULL);\n\tif (g_hFile == INVALID_HANDLE_VALUE)\n\t{\n\t\tCloseHandle(g_hFile);\n\t\treturn;\n\t}\n\n\tg_hFile2 = ::CreateFileA(file_name2, GENERIC_READ | GENERIC_WRITE, FILE_SHARE_READ | FILE_SHARE_WRITE, NULL, OPEN_EXISTING,\n\t\tFILE_ATTRIBUTE_NORMAL | FILE_FLAG_BACKUP_SEMANTICS, NULL);\n\tif (g_hFile == INVALID_HANDLE_VALUE)\n\t{\n\t\tCloseHandle(g_hFile2);\n\t\treturn;\n\t}\n\n\t\n\t\/\/ \u8bfb\u53d6json\n\tread_stocks();\n\n\n\t\/\/ show content:\n\t\/\/for (map&lt;DWORD, string&gt;::iterator it = msg_type_map.begin(); it != msg_type_map.end(); ++it)\n\t\/\/\tcout &lt;&lt; it-&gt;first &lt;&lt; \" =&gt; \" &lt;&lt; it-&gt;second.c_str() &lt;&lt; '\\n';\n\n\treturn;\n}\n\n\nvoid get_url_info(const char* stock, const char* args, string&amp; out) {\n\tstring str_stock = \"\";\n\tchar get_args&#91;0x100] = { 0 };\n\tif ((stock&#91;0] == '0' &amp;&amp; stock&#91;1] == '0') || (stock&#91;0] == '3'))\n\t{\n\t\tstr_stock = \"0.\" + string(stock);\n\t}\n\telse\n\t{\n\t\tstr_stock = \"1.\" + string(stock);\n\t}\n\tsprintf_s(get_args, args, str_stock.c_str(), time(0));\n\n\tout = HttpRequest(g_get_host, get_args);\n\n}\n\n\nvoid pymain(const char* time, const char* stock, int type_id, const char* num) {\n\n\tbool need_save = false;\n\tstring stock_info = \"\";\n\tstring str_time = time;\n\tstring str_stock = stock;\n\tstring str_type = msg_type_map&#91;type_id];  \/\/ \u83b7\u53d6\u6da8\u8dcc\u7c7b\u578b\n\n\tif (!str_type.empty())\n\t{\n\t\tfor (size_t i = 0; i &lt; follow_type_size; i++)\n\t\t{\n\t\t\t\/\/ \u5728\u5173\u6ce8\u5217\u8868\u4e2d\u5c31\u5199\u5165\u5230\u6587\u4ef6\n\t\t\tif (follow_type_list&#91;i].compare(str_type) == 0)\n\t\t\t{\n\t\t\t\tneed_save = true;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\n\t\tif (need_save)\n\t\t{\n\t\t\ttry {\n\t\t\t\t\/\/ \u83b7\u53d6\u80a1\u7968\u4fe1\u606f\n\t\t\t\tstring out_json_zl;\n\t\t\t\tstring out_json_info;\n\t\t\t\tstring stock_info = \"\";\n\t\t\t\tjson json_zl;\n\t\t\t\tjson json_info3;\n\t\t\t\tget_url_info(stock, g_stock_dd, out_json_zl);\n\t\t\t\tjson_zl = json::parse(out_json_zl.c_str());\n\t\t\t\tfloat zl_jingliuru = json_zl&#91;\"data\"]&#91;\"diff\"]&#91;0]&#91;\"f62\"].get&lt;float&gt;();\n\t\t\t\tfloat zl_jingbi = json_zl&#91;\"data\"]&#91;\"diff\"]&#91;0]&#91;\"f184\"].get&lt;float&gt;();\n\n\t\t\t\tget_url_info(stock, g_stock_info_url, out_json_info);\n\t\t\t\tjson_zl = json::parse(out_json_info.c_str());\n\t\t\t\tif (json_zl&#91;\"data\"].empty())\n\t\t\t\t{\n\t\t\t\t\tstock_info = str_format(\"\u4e3b\u529b\u51c0\u6d41\u5165:%.01f \u4e3b\u529b\u51c0\u6bd4:%.02f%%\", zl_jingliuru, zl_jingbi);\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tstring rname = json_zl&#91;\"data\"]&#91;\"f58\"].get&lt;string&gt;();\n\t\t\t\t\tstring name = UtfToGbk(rname.c_str());\n\t\t\t\t\tfloat zhangdie = json_zl&#91;\"data\"]&#91;\"f170\"].get&lt;float&gt;();\n\t\t\t\t\tfloat huanshou = json_zl&#91;\"data\"]&#91;\"f168\"].get&lt;float&gt;();\n\t\t\t\t\tfloat jine = json_zl&#91;\"data\"]&#91;\"f48\"].get&lt;float&gt;();\n\t\t\t\t\tstock_info = str_format(\"\u80a1\u7968:%s \u6362\u624b:%.02f%% \u6210\u4ea4\u91d1\u989d:%.02f \u4e3b\u529b\u51c0\u6d41\u5165:%.01f \u4e3b\u529b\u51c0\u6bd4:%.02f%%\", name.c_str(), huanshou, jine, zl_jingliuru, zl_jingbi);\n\t\t\t\t}\n\t\t\t\twrite_file(g_hFile, str_type.c_str(), str_time.c_str(), str_stock.c_str(), stock_info.c_str());\n\t\t\t}\n\t\t\tcatch (...) {\n\t\t\t\tcout &lt;&lt; \"catch (...)\" &lt;&lt; endl;\n\t\t\t\twrite_file(g_hFile, str_type.c_str(), str_time.c_str(), str_stock.c_str(), stock_info.c_str());\n\t\t\t}\n\t\t}\n\t\telse {\n\t\t\tstring stock_info = \"\";\n\t\t\twrite_file(g_hFile2, str_type.c_str(), str_time.c_str(), str_stock.c_str(), stock_info.c_str());\n\t\t}\n\t}\n}\n\nDWORD WINAPI SaveStockInfoThread(LPVOID lpargs) {\n\tstock_info* p = (stock_info*)lpargs;\t\/\/ \u8f6c\u6362\u4e3a\u7ed3\u6784\u4f53\u6307\u9488\n\tpymain(p-&gt;time, p-&gt;stock, p-&gt;type, p-&gt;num);\n\treturn 0;\n}\n\n\n\n\n\n\nvoid mod1(const char* time, const char* stock, int type_id, const char* num) {\n\tbool need_save = false;\n\tstring buy_msg = \"\";\n\tstring str_time = time;\n\tstring str_stock_name = \"\";\n\tstring str_stock = stock;\n\tstring str_type = msg_type_map&#91;type_id];  \/\/ \u83b7\u53d6\u6da8\u8dcc\u7c7b\u578b\n\tfloat f_zhangfu = 0.0;\n\tfloat f_dd_zb = 0.0;\n\tfloat f_dd_jlr = 0.0;\n\n\tif (!str_type.empty())\n\t{\n\t\tfor (size_t i = 0; i &lt; follow_type_size; i++)\n\t\t{\n\t\t\t\/\/ \u5927\u5355\u4e70\u5165\u7c7b\u578b\n\t\t\tif (follow_type_list&#91;i].compare(str_type) == 0)\n\t\t\t{\n\t\t\t\t\/\/ \u5728\u5173\u6ce8\u80a1\u7968\u5217\u8868\u4e2d\n\t\t\t\tneed_save = search_buy_stock(stock);\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\tif (need_save)\n\t\t{\n\t\t\ttry {\n\t\t\t\t\/\/ \u83b7\u53d6\u80a1\u7968\u540d\u79f0\u548c\u6da8\u5e45\n\t\t\t\tget_stock_info(stock, type_id, str_stock_name, f_zhangfu);\n\t\t\t\tif (str_stock_name.empty()) {\n\t\t\t\t\tget_stock_info(stock, type_id, str_stock_name, f_zhangfu);\n\t\t\t\t}\n\t\t\t\t\/\/ \u6da8\u5e45&gt;4.5%\n\t\t\t\tif (f_zhangfu &gt;= 4.5)\n\t\t\t\t{\n\t\t\t\t\tget_stock_dd(stock, type_id, f_dd_zb, f_dd_jlr);\n\t\t\t\t\tif (f_dd_jlr == 0.0) {\n\t\t\t\t\t\tget_stock_dd(stock, type_id, f_dd_zb, f_dd_jlr);\n\t\t\t\t\t}\n\t\t\t\t\t\/\/ \u5927\u5355\u51c0\u6d41\u5165\u4e3a\u6b63 \u5360\u6bd4&gt;10%\n\t\t\t\t\tif (f_dd_zb &gt; 0 &amp;&amp; f_dd_jlr &gt; 10)\n\t\t\t\t\t{\n\t\t\t\t\t\tcout &lt;&lt; \"!!!!!!!!!!!!!!!!!!\\r\\n\";\n\t\t\t\t\t\tbuy_msg = str_format(\"&#91;\u4e70\u5165\u4e0b\u5355] %s %s %s %s \u6da8\u5e45:%0.2f%% \u4e3b\u529b\u5360\u6bd4:%0.2f%% \u4e3b\u529b\u51c0\u6d41\u5165:%0.2f\\r\\n\", time, stock, str_type.c_str(), str_stock_name.c_str(), f_zhangfu, f_dd_zb, f_dd_jlr);\n\t\t\t\t\t\tprintf(buy_msg.c_str());\n\t\t\t\t\t\twrite_file_close(\"\u4e70\u5165\u8bb0\u5f55.txt\", buy_msg.c_str());\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tcatch (...) {\n\t\t\t\tcout &lt;&lt; \"mod1 catch (...)\" &lt;&lt; endl;\n\t\t\t}\n\t\t}\n\t\telse {\n\t\t}\n\t}\n}\n\nDWORD WINAPI Mod1Thread(LPVOID lpargs) {\n\tcout &lt;&lt; \"Mod1Thread \u8fd0\u884c\\r\\n\";\n\tstock_info* p = (stock_info*)lpargs;\t\/\/ \u8f6c\u6362\u4e3a\u7ed3\u6784\u4f53\u6307\u9488\n\tmod1(p-&gt;time, p-&gt;stock, p-&gt;type, p-&gt;num);\n\treturn 0;\n}\n\n\n\nint WINAPI MySend(SOCKET s, const char* buf, int len, int flags)\n{\n\t\/\/OutputDebugStringA(\"MySend\");\n\treturn pSend(s, buf, len, flags);\n}\n\nint WINAPI MyRecv(SOCKET s, char* buf, int len, int flags)\n{\n\tstock_info S_info = { 0 };\n\tchar sz_id&#91;9] = { 0 };\n\tchar sz_msg&#91;0x100] = { 0 };\n\tDWORD dw_num_id = 0;\n\tDWORD dw_num = 0;\n\tHANDLE hThread = NULL;\n\n\t\/\/ \u83b7\u53d6\u6d88\u606fID\n\tmemcpy(sz_id, buf + 4, 8);\n\tstring str_id = sz_id;\n\n\t\/\/ \u5b58\u5728\u6d88\u606fID\u518d\u5f80\u4e0b\u8d70\n\tif (str_id.find(\"0000\") == str_id.npos)\n\t{\n\t\treturn pRecv(s, buf, len, flags);\n\t}\n\n\t\/\/ \u77ed\u7ebf\u7cbe\u7075\u6d88\u606fID\n\tif (str_id.compare(\"000000ba\") == 0)\n\t{\n\t\t\/\/ \u5224\u65ad\u5934\u90e8\u662f\u5426\u5305\u542b\"market=\"\n\t\tlstrcpyA(sz_msg, buf + 4);\n\t\tstring str_msg(sz_msg);\n\t\tif (str_msg.find(\"market=\") == str_msg.npos)\n\t\t{\n\t\t\treturn pRecv(s, buf, len, flags);\n\t\t}\n\n\t\t\/\/ \u83b7\u53d6\u80a1\u7968ID\n\t\tmemcpy(S_info.stock, buf + 0xac, 6);\n\t\t\/\/ \u83b7\u53d6\u77ed\u7ebf\u7cbe\u7075ID\n\t\tS_info.type = *(DWORD*)(DWORD)(buf + 0xb3);\n\t\t\/\/ \u83b7\u53d6\u7c7b\u578bID\n\t\tdw_num_id = *(DWORD*)(DWORD)(buf + 0xb7);\n\t\t\n\t\t\/\/ \u83b7\u53d6\u5f53\u524d\u672c\u5730\u7cfb\u7edf\u65f6\u95f4 \u65f6:\u5206:\u79d2\n\t\tGetLocalTime(&amp;systm);\n\t\tsprintf_s(S_info.time, \"%.2d:%.2d:%.2d\", systm.wHour, systm.wMinute, systm.wSecond);\n\n\t\t\/\/ \u4fdd\u5b58\u80a1\u7968\u4fe1\u606f\n\t\t\/\/hThread = CreateThread(0, 0, SaveStockInfoThread, &amp;S_info, 0, 0);\n\t\t\/\/if (hThread){\n\t\t\/\/\tCloseHandle(hThread);\n\t\t\/\/}\n\t\t\/\/ \u6a21\u578b1\n\t\thThread = CreateThread(0, 0, Mod1Thread, &amp;S_info, 0, 0);\n\t\tif (hThread){\n\t\t\tCloseHandle(hThread);\n\t\t}\n\n\t\t\/\/ \u6253\u5370\u6da8\u8dcc\u4fe1\u606f\n\t\tstring type_str = msg_type_map&#91;S_info.type];  \n\t\tif (!type_str.empty())\n\t\t{\n\t\t\tDbgPrintA(\"&#91;THS]%s %s %s\", S_info.time, S_info.stock, type_str.c_str());\n\t\t}\n\t\telse {\n\t\t\tDbgPrintA(\"&#91;THS]%s %s %x\", S_info.time, S_info.stock, S_info.type);\n\t\t}\n\t}\n\treturn pRecv(s, buf, len, flags);\n}\n\n\n\nextern \"C\" __declspec(dllexport) void dummy(void) {\n\treturn;\n}\n\n\n\n\nvoid test() {\n\tstock_info S_info = { 0 };\n\tlstrcpyA(S_info.stock, \"002629\");\n\tlstrcpyA(S_info.time, \"11:11:11\");\n\tS_info.type = 0x40080cd6;\n\tMod1Thread(&amp;S_info);\n\n\tfor (size_t i = 0; i &lt; 5*60; i++)\n\t{\n\t\tHWND h_hwnd = FindWindowA(0, \"\u540c\u82b1\u987a(v9.10.20) - \u4e0a\u8bc1\u6307\u6570\");\n\t\tShowWindow(h_hwnd, SW_HIDE);\n\t\tSleep(200);\n\t}\n\tsystem(\"taskkill \/IM xiadan.exe\");\n}\nBOOL WINAPI DllMain(HINSTANCE hinst, DWORD dwReason, LPVOID reserved)\n{\n\tif (DetourIsHelperProcess()) {\n\t\treturn TRUE;\n\t}\n\tif (dwReason == DLL_PROCESS_ATTACH) {\n\n\t\tmy_init(\"\u70ed\u70b9.txt\", \"\u51b0\u70b9.txt\");\n\t\tInitConsoleWindows();\n\t\tCreateThread(0,0,(LPTHREAD_START_ROUTINE)test, 0, 0, 0);\n\n\n\t\tDetourRestoreAfterWith();\n\n\t\tDetourTransactionBegin();\n\t\tDetourUpdateThread(GetCurrentThread());\n\t\tDetourAttach(&amp;(PVOID&amp;)pSend, MySend);\n\t\tDetourTransactionCommit();\n\n\n\t\tDetourTransactionBegin();\n\t\tDetourUpdateThread(GetCurrentThread());\n\t\tDetourAttach(&amp;(PVOID&amp;)pRecv, MyRecv);\n\t\tDetourTransactionCommit();\n\t}\n\telse if (dwReason == DLL_PROCESS_DETACH) {\n\t\tCloseHandle(g_hFile);\n\t\tCloseHandle(g_hFile2);\n\t\tDetourTransactionBegin();\n\t\tDetourUpdateThread(GetCurrentThread());\n\t\tDetourDetach(&amp;(PVOID&amp;)pSend, MySend);\n\t\tDetourTransactionCommit();\n\n\t\tDetourTransactionBegin();\n\t\tDetourUpdateThread(GetCurrentThread());\n\t\tDetourDetach(&amp;(PVOID&amp;)pRecv, MyRecv);\n\t\tDetourTransactionCommit();\n\t}\n\treturn TRUE;\n}\n\n\n\n\n\n\nvoid InitConsoleWindows()\n{\n\tAllocConsole();\n\n#if _MSC_VER &lt;= 1200 \/\/\u8fd9\u4e2a\u662fvc6.0\n\tfreopen(\"CONOUT$\", \"w+t\", stdout);\n#else \/\/\u8fd9\u4e2a\u662fvc2003\u4ee5\u4e0a\n\tFILE* stream;\n\tfreopen_s(&amp;stream, \"CONOUT$\", \"wt\", stdout);\n\tfreopen_s(&amp;stream, \"CONIN\", \"rt\", stdin);\n\n#endif\n}\n\n\n\n\nstring HttpRequest(string site, string param) {\n\tHINTERNET hInternet = InternetOpenW(L\"YourUserAgent\", INTERNET_OPEN_TYPE_DIRECT, NULL, NULL, 0); \/\/you should perhaps edit your useragent ? :p\n\tif (hInternet == NULL) {\n\t\treturn \"InternetOpenW failed(hInternet): \" + GetLastError();\n\t}\n\telse {\n\t\twstring widestr;\n\t\tfor (size_t i = 0; i &lt; site.length(); ++i) {\n\t\t\twidestr += wchar_t(site&#91;i]);\n\t\t}\n\t\tconst wchar_t* site_name = widestr.c_str();\n\t\twstring widestr2;\n\t\tfor (size_t i = 0; i &lt; param.length(); ++i) {\n\t\t\twidestr2 += wchar_t(param&#91;i]);\n\t\t}\n\t\tconst wchar_t* site_param = widestr2.c_str();\n\t\t\/\/ We need to convert str to const wchar_t as the args require!\n\t\tHINTERNET hConnect = InternetConnectW(hInternet, site_name, 80, NULL, NULL, INTERNET_SERVICE_HTTP, 0, NULL);\n\t\tif (hConnect == NULL) {\n\t\t\treturn \"InternetConnectW failed(hConnect == NULL): \" + GetLastError();\n\t\t}\n\t\telse {\n\t\t\tconst wchar_t* parrAcceptTypes&#91;] = { L\"text\/*\", NULL }; \/\/ accepted types. We'll choose text.\n\t\t\tHINTERNET hRequest = HttpOpenRequestW(hConnect, L\"GET\", site_param, NULL, NULL, parrAcceptTypes, 0, 0);\n\t\t\tif (hRequest == NULL) {\n\t\t\t\treturn \"HttpOpenRequestW failed(hRequest == NULL): \" + GetLastError();\n\t\t\t}\n\t\t\telse {\n\t\t\t\tBOOL bRequestSent = HttpSendRequestW(hRequest, NULL, 0, NULL, 0);\n\t\t\t\tif (!bRequestSent) {\n\t\t\t\t\treturn \"!bRequestSent    HttpSendRequestW failed with error code \" + GetLastError();\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tstd::string strResponse;\n\t\t\t\t\tconst int nBuffSize = 1024;\n\t\t\t\t\tchar buff&#91;nBuffSize];\n\t\t\t\t\tBOOL bKeepReading = true;\n\t\t\t\t\tDWORD dwBytesRead = -1;\n\t\t\t\t\twhile (bKeepReading &amp;&amp; dwBytesRead != 0) {\n\t\t\t\t\t\tbKeepReading = InternetReadFile(hRequest, buff, nBuffSize, &amp;dwBytesRead);\n\t\t\t\t\t\tstrResponse.append(buff, dwBytesRead);\n\t\t\t\t\t}\n\t\t\t\t\treturn strResponse;\n\t\t\t\t}\n\t\t\t\tInternetCloseHandle(hRequest);\n\t\t\t}\n\t\t\tInternetCloseHandle(hConnect);\n\t\t}\n\t\tInternetCloseHandle(hInternet);\n\t}\n}\n\n\n\n\nvoid IsFileExist(const char* csFile)\n{\n\tDWORD dwAttrib = GetFileAttributesA(csFile);\n\tif (INVALID_FILE_ATTRIBUTES == dwAttrib) {\n\t\tHANDLE hFile = ::CreateFileA(csFile, GENERIC_READ | GENERIC_WRITE, 0, NULL, CREATE_NEW,\n\t\t\tFILE_ATTRIBUTE_NORMAL | FILE_FLAG_BACKUP_SEMANTICS, NULL);\n\t\tCloseHandle(hFile);\n\t}\n}\n\n\nchar* UtfToGbk(const char* utf8)\n{\n\tint len = MultiByteToWideChar(CP_UTF8, 0, utf8, -1, NULL, 0);\n\twchar_t* wstr = new wchar_t&#91;len + 1];\n\tmemset(wstr, 0, len + 1);\n\tMultiByteToWideChar(CP_UTF8, 0, utf8, -1, wstr, len);\n\tlen = WideCharToMultiByte(CP_ACP, 0, wstr, -1, NULL, 0, NULL, NULL);\n\tchar* str = new char&#91;len + 1];\n\tmemset(str, 0, len + 1);\n\tWideCharToMultiByte(CP_ACP, 0, wstr, -1, str, len, NULL, NULL);\n\tif (wstr) delete&#91;] wstr;\n\treturn str;\n}\n\n\n\nvoid write_file(HANDLE hfile, const char* type_str, const char* time, const char* stock, const char* info) {\n\n\tchar szbuf&#91;0x200] = { 0 };\n\n\tsprintf_s(szbuf, \"%s %s %s %s\\r\\n\", time, stock, type_str, info);\n\n\t\/\/\u5199\u6570\u636e\n\tDWORD writesize = 0;\n\t\/\/\u8bbe\u7f6e\u504f\u79fb\u91cf \u5230\u6587\u4ef6\u5c3e\u90e8 \u914d\u5408OPEN_EXISTING\u4f7f\u7528 \u53ef\u5b9e\u73b0\u8ffd\u52a0\u5199\u5165\u6587\u4ef6\n\tSetFilePointer(hfile, NULL, NULL, FILE_END);\n\tWriteFile(hfile, szbuf, strlen(szbuf), &amp;writesize, NULL);\n\t\/\/\u5237\u65b0\u6587\u4ef6\u7f13\u51b2\u533a\n\tFlushFileBuffers(hfile);\n\t\/\/CloseHandle(g_hFile);\n\n\treturn;\n}\n\n\nvoid write_file_close(const char* filename, const char* write_buf) {\n\t\/\/ \u68c0\u6d4b\u662f\u5426\u5b58\u5728\n\tIsFileExist(filename);\n\t\/\/ \u6253\u5f00\u6587\u4ef6\n\tHANDLE hFile = ::CreateFileA(filename, GENERIC_READ | GENERIC_WRITE, FILE_SHARE_READ | FILE_SHARE_WRITE, NULL, OPEN_EXISTING,\n\t\tFILE_ATTRIBUTE_NORMAL | FILE_FLAG_BACKUP_SEMANTICS, NULL);\n\tif (hFile == INVALID_HANDLE_VALUE) {\n\t\tCloseHandle(hFile);\n\t\treturn;\n\t}\n\t\/\/\u5199\u6570\u636e\n\tDWORD writesize = 0;\n\t\/\/\u8bbe\u7f6e\u504f\u79fb\u91cf \u5230\u6587\u4ef6\u5c3e\u90e8 \u914d\u5408OPEN_EXISTING\u4f7f\u7528 \u53ef\u5b9e\u73b0\u8ffd\u52a0\u5199\u5165\u6587\u4ef6\n\tSetFilePointer(hFile, NULL, NULL, FILE_END);\n\tWriteFile(hFile, write_buf, strlen(write_buf), &amp;writesize, NULL);\n\t\/\/\u5237\u65b0\u6587\u4ef6\u7f13\u51b2\u533a\n\tFlushFileBuffers(hFile);\n\tCloseHandle(hFile);\n\treturn;\n}\n\n\n\n\n\n\n\nVOID PrintHex(PBYTE Data, ULONG dwBytes) {\n\tprintf(\"\\r\\n\");\n\tfor (ULONG i = 0; i &lt; dwBytes; i += 16) {\n\t\tprintf(\"%.8x: \", i);\n\n\t\tfor (ULONG j = 0; j &lt; 16; j++) {\n\t\t\tif (i + j &lt; dwBytes) {\n\t\t\t\tprintf(\"%.2x \", Data&#91;i + j]);\n\t\t\t}\n\t\t\telse {\n\t\t\t\tprintf(\"?? \");\n\t\t\t}\n\t\t}\n\n\t\tfor (ULONG j = 0; j &lt; 16; j++) {\n\t\t\tif (i + j &lt; dwBytes &amp;&amp; Data&#91;i + j] &gt;= 0x20 &amp;&amp; Data&#91;i + j] &lt;= 0x7e) {\n\t\t\t\tprintf(\"%c\", Data&#91;i + j]);\n\t\t\t}\n\t\t\telse {\n\t\t\t\tprintf(\".\");\n\t\t\t}\n\t\t}\n\n\t\tprintf(\"\\n\");\n\t}\n}\n\nvoid DbgPrintA(LPCSTR lpszFormat, ...)\n{\n\tva_list   args;\n\tCHAR     szBuffer&#91;0x1000];\n\tva_start(args, lpszFormat);\n\twvsprintfA(szBuffer, lpszFormat, args);\n\tOutputDebugStringA(szBuffer);\n\tprintf(szBuffer);\n\tprintf(\"\\r\\n\");\n\tva_end(args);\n\n}\n\n\n\n\n\/\/\u5c06\u5341\u516d\u8fdb\u5236\u7684\u5b57\u7b26\u4e32\u8f6c\u6362\u6210\u6574\u6570  \nint htoi(char s&#91;])\n{\n\tint i;\n\tint n = 0;\n\tif (s&#91;0] == '0' &amp;&amp; (s&#91;1] == 'x' || s&#91;1] == 'X'))\n\t{\n\t\ti = 2;\n\t}\n\telse\n\t{\n\t\ti = 0;\n\t}\n\tfor (; (s&#91;i] &gt;= '0' &amp;&amp; s&#91;i] &lt;= '9') || (s&#91;i] &gt;= 'a' &amp;&amp; s&#91;i] &lt;= 'z') || (s&#91;i] &gt;= 'A' &amp;&amp; s&#91;i] &lt;= 'Z'); ++i)\n\t{\n\t\tif (tolower(s&#91;i]) &gt; '9')\n\t\t{\n\t\t\tn = 16 * n + (10 + tolower(s&#91;i]) - 'a');\n\t\t}\n\t\telse\n\t\t{\n\t\t\tn = 16 * n + (tolower(s&#91;i]) - '0');\n\t\t}\n\t}\n\treturn n;\n}\n\n\n\n\n\n<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>\u53d1\u4e2a\u524d\u5e74\u5199\u7684\u77ed\u7ebf\u7cbe\u7075\u534f\u8bae\u9006\u5411\u7684\u4ee3\u7801\uff0cHook\u7684recv\u51fd\u6570\uff0c\u7136\u540e\u76d1\u63a7\u6bcf\u4e2a\u6570\u636e\u5305\u7ed3\u6784\uff0c\u53ef\u4ee5\u901a\u8fc7\u8be5\u65b9\u6cd5\u5b9e\u73b0\u6240\u6709\u5ba2\u6237 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_uag_custom_page_level_css":"","site-sidebar-layout":"default","site-content-layout":"","ast-site-content-layout":"default","site-content-style":"default","site-sidebar-style":"default","ast-global-header-display":"","ast-banner-title-visibility":"","ast-main-header-display":"","ast-hfb-above-header-display":"","ast-hfb-below-header-display":"","ast-hfb-mobile-header-display":"","site-post-title":"","ast-breadcrumbs-content":"","ast-featured-img":"","footer-sml-layout":"","ast-disable-related-posts":"","theme-transparent-header-meta":"","adv-header-id-meta":"","stick-header-meta":"","header-above-stick-meta":"","header-main-stick-meta":"","header-below-stick-meta":"","astra-migrate-meta-layouts":"default","ast-page-background-enabled":"default","ast-page-background-meta":{"desktop":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"ast-content-background-meta":{"desktop":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"footnotes":""},"categories":[1],"tags":[],"class_list":["post-1873","post","type-post","status-publish","format-standard","hentry","category-paper"],"uagb_featured_image_src":{"full":false,"thumbnail":false,"medium":false,"medium_large":false,"large":false,"1536x1536":false,"2048x2048":false},"uagb_author_info":{"display_name":"quantw","author_link":"https:\/\/www.pigquant.com\/?author=1"},"uagb_comment_info":8,"uagb_excerpt":"\u53d1\u4e2a\u524d\u5e74\u5199\u7684\u77ed\u7ebf\u7cbe\u7075\u534f\u8bae\u9006\u5411\u7684\u4ee3\u7801\uff0cHook\u7684recv\u51fd\u6570\uff0c\u7136\u540e\u76d1\u63a7\u6bcf\u4e2a\u6570\u636e\u5305\u7ed3\u6784\uff0c\u53ef\u4ee5\u901a\u8fc7\u8be5\u65b9\u6cd5\u5b9e\u73b0\u6240\u6709\u5ba2\u6237&hellip;","_links":{"self":[{"href":"https:\/\/www.pigquant.com\/index.php?rest_route=\/wp\/v2\/posts\/1873","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.pigquant.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.pigquant.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.pigquant.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.pigquant.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1873"}],"version-history":[{"count":2,"href":"https:\/\/www.pigquant.com\/index.php?rest_route=\/wp\/v2\/posts\/1873\/revisions"}],"predecessor-version":[{"id":1876,"href":"https:\/\/www.pigquant.com\/index.php?rest_route=\/wp\/v2\/posts\/1873\/revisions\/1876"}],"wp:attachment":[{"href":"https:\/\/www.pigquant.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1873"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.pigquant.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1873"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.pigquant.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1873"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}