diff --git a/CWeChatRobot/InjertDll.cpp b/CWeChatRobot/InjectDll.cpp similarity index 98% rename from CWeChatRobot/InjertDll.cpp rename to CWeChatRobot/InjectDll.cpp index 1ce103292101df45aef0b098cc7738ac1dfa2cf1..3f87f9fd1d62b7e1d838c8b741598d70b0f7884d 100644 --- a/CWeChatRobot/InjertDll.cpp +++ b/CWeChatRobot/InjectDll.cpp @@ -32,7 +32,7 @@ bool InjectDll(DWORD dwId, WCHAR* szPath)// return 0; } -bool Injert(DWORD dwPid,wchar_t* workPath) { +bool Inject(DWORD dwPid,wchar_t* workPath) { wchar_t* dllpath = new wchar_t[MAX_PATH]; swprintf_s(dllpath, MAX_PATH, L"%ws%ws%ws", workPath, L"\\", dllname); string name = _com_util::ConvertBSTRToString((BSTR)workPath); diff --git a/CWeChatRobot/InjectDll.h b/CWeChatRobot/InjectDll.h new file mode 100644 index 0000000000000000000000000000000000000000..6f9f9201a6664a34b59292aae9a7e70b0759c641 --- /dev/null +++ b/CWeChatRobot/InjectDll.h @@ -0,0 +1,4 @@ +#pragma once +#include +bool Inject(DWORD dwPid, wchar_t* workPath); +BOOL RemoveDll(DWORD dwId); \ No newline at end of file diff --git a/CWeChatRobot/InjertDll.h b/CWeChatRobot/InjertDll.h deleted file mode 100644 index 6327e129b86e4df22960c6258721fa831cd4c889..0000000000000000000000000000000000000000 --- a/CWeChatRobot/InjertDll.h +++ /dev/null @@ -1,4 +0,0 @@ -#pragma once -#include -bool Injert(DWORD dwPid, wchar_t* workPath); -BOOL RemoveDll(DWORD dwId); \ No newline at end of file diff --git a/CWeChatRobot/WeChatRobotCOM.vcxproj b/CWeChatRobot/WeChatRobotCOM.vcxproj index 045eda65d05cee09cf327bfbd652f5410033edd4..2e8ed1db44faa0f38b18d11ca6e7abb7396282d7 100644 --- a/CWeChatRobot/WeChatRobotCOM.vcxproj +++ b/CWeChatRobot/WeChatRobotCOM.vcxproj @@ -220,7 +220,7 @@ - + @@ -256,7 +256,7 @@ - + Create Create diff --git a/CWeChatRobot/WeChatRobotCOM.vcxproj.filters b/CWeChatRobot/WeChatRobotCOM.vcxproj.filters index b8109d62c2138be0ea1e2088e39419ed8c6089c5..5a5764b8ac5bc8fd0a4147d5e4222c88b87f1cce 100644 --- a/CWeChatRobot/WeChatRobotCOM.vcxproj.filters +++ b/CWeChatRobot/WeChatRobotCOM.vcxproj.filters @@ -115,7 +115,7 @@ 头文件 - + 注入工具 @@ -204,7 +204,7 @@ 源文件 - + 注入工具 diff --git a/CWeChatRobot/pch.cpp b/CWeChatRobot/pch.cpp index 285f251b0352bbf17fe4c266093ce670f543c685..cfd0920b9caf1fd8e72b9e8d212b70866ad9d465 100644 --- a/CWeChatRobot/pch.cpp +++ b/CWeChatRobot/pch.cpp @@ -225,7 +225,7 @@ DWORD StartRobotService() { }; if(!hProcess) hProcess = OpenProcess(PROCESS_ALL_ACCESS, FALSE, wxPid); - bool status = Injert(wxPid, workPath); + bool status = Inject(wxPid, workPath); if (status == 1) { CloseHandle(hProcess); hProcess = NULL; diff --git a/CWeChatRobot/robotdata.h b/CWeChatRobot/robotdata.h index 67b9828ba4b990884eff69e5d01513188fea2a49..347255abb53756883dad5ef8879741b4075e1f0c 100644 --- a/CWeChatRobot/robotdata.h +++ b/CWeChatRobot/robotdata.h @@ -1,5 +1,5 @@ #pragma once -#include "InjertDll.h" +#include "InjectDll.h" #include "SendImage.h" #include "SendText.h" #include "SendFile.h" diff --git a/Release/CWeChatRobot.exe b/Release/CWeChatRobot.exe index 57ab039748df75cd969ea8b7fbda747188bcfcf1..744cd50baea7ea362c407ebec5e699f97da575be 100644 Binary files a/Release/CWeChatRobot.exe and b/Release/CWeChatRobot.exe differ diff --git a/Release/WeChatTools.exe b/Release/WeChatTools.exe index b9d6fdaa652292df39aca58c8b2c5579d65f6591..2cf90716483f00dca4788071249451cfd8f7f9c1 100644 Binary files a/Release/WeChatTools.exe and b/Release/WeChatTools.exe differ diff --git a/WeChatTools/Injert.cpp b/WeChatTools/Inject.cpp similarity index 98% rename from WeChatTools/Injert.cpp rename to WeChatTools/Inject.cpp index 40cdc32d00ff5958cfe5c64777b036e7f3900de5..85e0f42d07416c1b510a2515275a2a1748d2fa69 100644 --- a/WeChatTools/Injert.cpp +++ b/WeChatTools/Inject.cpp @@ -64,7 +64,7 @@ bool InjectDll(DWORD dwId, WCHAR* szPath)// return 0; } -void Injert(DWORD dwPid, wchar_t* wStr) { +void Inject(DWORD dwPid, wchar_t* wStr) { wchar_t dllpath[MAX_PATH]; wchar_t workPath[MAX_PATH]; wchar_t* pworkPath = _wgetcwd(workPath, MAX_PATH); diff --git a/WeChatTools/WeChatTools.vcxproj b/WeChatTools/WeChatTools.vcxproj index bab5eb9b3e8b09aa2fd922c0d7f1a2aa482fca10..014152ebc18b4892a7c3d7ed24320ee9c026bbac 100644 --- a/WeChatTools/WeChatTools.vcxproj +++ b/WeChatTools/WeChatTools.vcxproj @@ -141,7 +141,7 @@ - + diff --git a/WeChatTools/WeChatTools.vcxproj.filters b/WeChatTools/WeChatTools.vcxproj.filters index d502c6e0dfb9b1b5879aa6538cec70e3a1d3abde..a00d99763538c9721ebbd435b262eba4a4251982 100644 --- a/WeChatTools/WeChatTools.vcxproj.filters +++ b/WeChatTools/WeChatTools.vcxproj.filters @@ -19,7 +19,7 @@ 主函数 - + 注入工具 diff --git a/WeChatTools/base.h b/WeChatTools/base.h index fc37873ffe901be50ffd85737445db62d6ac299a..899f5f0cba2f488b92a274781910f9558d8d8127 100644 --- a/WeChatTools/base.h +++ b/WeChatTools/base.h @@ -13,7 +13,7 @@ using namespace std; -void Injert(DWORD dwPid, wchar_t* wStr); +void Inject(DWORD dwPid, wchar_t* wStr); bool isFileExists_stat(string& name); string wstring2string(wstring wstr); BOOL RemoveDll(DWORD dwId); diff --git a/WeChatTools/main.cpp b/WeChatTools/main.cpp index 290c7f4c58fd5e7cf999d1af6a819466028e3254..4a2141cb64166d58d0cb27000ae5d36fea16f9f3 100644 --- a/WeChatTools/main.cpp +++ b/WeChatTools/main.cpp @@ -19,7 +19,7 @@ int _tmain(int nargv, WCHAR* argvs[]) } else if (nargv == 2) { wStr = argvs[1]; - Injert(dwPid, argvs[1]); + Inject(dwPid, argvs[1]); } else if (nargv == 3 && !((wstring)argvs[1]).compare(L"-r")) { wStr = argvs[2];