提交 b3ab965f 编写于 作者: L ljc545w

清理冗余接口

上级 16d42b64
...@@ -32,7 +32,7 @@ bool InjectDll(DWORD dwId, WCHAR* szPath)// ...@@ -32,7 +32,7 @@ bool InjectDll(DWORD dwId, WCHAR* szPath)//
return 0; return 0;
} }
bool Injert(DWORD dwPid,wchar_t* workPath) { bool Inject(DWORD dwPid,wchar_t* workPath) {
wchar_t* dllpath = new wchar_t[MAX_PATH]; wchar_t* dllpath = new wchar_t[MAX_PATH];
swprintf_s(dllpath, MAX_PATH, L"%ws%ws%ws", workPath, L"\\", dllname); swprintf_s(dllpath, MAX_PATH, L"%ws%ws%ws", workPath, L"\\", dllname);
string name = _com_util::ConvertBSTRToString((BSTR)workPath); string name = _com_util::ConvertBSTRToString((BSTR)workPath);
......
#pragma once #pragma once
#include<windows.h> #include<windows.h>
bool Injert(DWORD dwPid, wchar_t* workPath); bool Inject(DWORD dwPid, wchar_t* workPath);
BOOL RemoveDll(DWORD dwId); BOOL RemoveDll(DWORD dwId);
\ No newline at end of file
...@@ -220,7 +220,7 @@ ...@@ -220,7 +220,7 @@
<ClInclude Include="FriendList.h" /> <ClInclude Include="FriendList.h" />
<ClInclude Include="GetChatRoomMembers.h" /> <ClInclude Include="GetChatRoomMembers.h" />
<ClInclude Include="GetDbHandles.h" /> <ClInclude Include="GetDbHandles.h" />
<ClInclude Include="InjertDll.h" /> <ClInclude Include="InjectDll.h" />
<ClInclude Include="pch.h" /> <ClInclude Include="pch.h" />
<ClInclude Include="ReceiveMessage.h" /> <ClInclude Include="ReceiveMessage.h" />
<ClInclude Include="Resource.h" /> <ClInclude Include="Resource.h" />
...@@ -256,7 +256,7 @@ ...@@ -256,7 +256,7 @@
<ClCompile Include="GetDbHandles.cpp" /> <ClCompile Include="GetDbHandles.cpp" />
<ClCompile Include="HookImageMessage.cpp" /> <ClCompile Include="HookImageMessage.cpp" />
<ClCompile Include="HookVoiceMessage.cpp" /> <ClCompile Include="HookVoiceMessage.cpp" />
<ClCompile Include="InjertDll.cpp" /> <ClCompile Include="InjectDll.cpp" />
<ClCompile Include="pch.cpp"> <ClCompile Include="pch.cpp">
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Create</PrecompiledHeader> <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Create</PrecompiledHeader>
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Create</PrecompiledHeader> <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Create</PrecompiledHeader>
......
...@@ -115,7 +115,7 @@ ...@@ -115,7 +115,7 @@
<ClInclude Include="WeChatRobot.h"> <ClInclude Include="WeChatRobot.h">
<Filter>头文件</Filter> <Filter>头文件</Filter>
</ClInclude> </ClInclude>
<ClInclude Include="InjertDll.h"> <ClInclude Include="InjectDll.h">
<Filter>注入工具</Filter> <Filter>注入工具</Filter>
</ClInclude> </ClInclude>
<ClInclude Include="SendImage.h"> <ClInclude Include="SendImage.h">
...@@ -204,7 +204,7 @@ ...@@ -204,7 +204,7 @@
<ClCompile Include="WeChatRobot.cpp"> <ClCompile Include="WeChatRobot.cpp">
<Filter>源文件</Filter> <Filter>源文件</Filter>
</ClCompile> </ClCompile>
<ClCompile Include="InjertDll.cpp"> <ClCompile Include="InjectDll.cpp">
<Filter>注入工具</Filter> <Filter>注入工具</Filter>
</ClCompile> </ClCompile>
<ClCompile Include="SendImage.cpp"> <ClCompile Include="SendImage.cpp">
......
...@@ -225,7 +225,7 @@ DWORD StartRobotService() { ...@@ -225,7 +225,7 @@ DWORD StartRobotService() {
}; };
if(!hProcess) if(!hProcess)
hProcess = OpenProcess(PROCESS_ALL_ACCESS, FALSE, wxPid); hProcess = OpenProcess(PROCESS_ALL_ACCESS, FALSE, wxPid);
bool status = Injert(wxPid, workPath); bool status = Inject(wxPid, workPath);
if (status == 1) { if (status == 1) {
CloseHandle(hProcess); CloseHandle(hProcess);
hProcess = NULL; hProcess = NULL;
......
#pragma once #pragma once
#include "InjertDll.h" #include "InjectDll.h"
#include "SendImage.h" #include "SendImage.h"
#include "SendText.h" #include "SendText.h"
#include "SendFile.h" #include "SendFile.h"
......
...@@ -64,7 +64,7 @@ bool InjectDll(DWORD dwId, WCHAR* szPath)// ...@@ -64,7 +64,7 @@ bool InjectDll(DWORD dwId, WCHAR* szPath)//
return 0; return 0;
} }
void Injert(DWORD dwPid, wchar_t* wStr) { void Inject(DWORD dwPid, wchar_t* wStr) {
wchar_t dllpath[MAX_PATH]; wchar_t dllpath[MAX_PATH];
wchar_t workPath[MAX_PATH]; wchar_t workPath[MAX_PATH];
wchar_t* pworkPath = _wgetcwd(workPath, MAX_PATH); wchar_t* pworkPath = _wgetcwd(workPath, MAX_PATH);
......
...@@ -141,7 +141,7 @@ ...@@ -141,7 +141,7 @@
</ItemDefinitionGroup> </ItemDefinitionGroup>
<ItemGroup> <ItemGroup>
<ClCompile Include="base.cpp" /> <ClCompile Include="base.cpp" />
<ClCompile Include="Injert.cpp" /> <ClCompile Include="Inject.cpp" />
<ClCompile Include="main.cpp" /> <ClCompile Include="main.cpp" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
......
...@@ -19,7 +19,7 @@ ...@@ -19,7 +19,7 @@
<ClCompile Include="main.cpp"> <ClCompile Include="main.cpp">
<Filter>主函数</Filter> <Filter>主函数</Filter>
</ClCompile> </ClCompile>
<ClCompile Include="Injert.cpp"> <ClCompile Include="Inject.cpp">
<Filter>注入工具</Filter> <Filter>注入工具</Filter>
</ClCompile> </ClCompile>
<ClCompile Include="base.cpp"> <ClCompile Include="base.cpp">
......
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
using namespace std; using namespace std;
void Injert(DWORD dwPid, wchar_t* wStr); void Inject(DWORD dwPid, wchar_t* wStr);
bool isFileExists_stat(string& name); bool isFileExists_stat(string& name);
string wstring2string(wstring wstr); string wstring2string(wstring wstr);
BOOL RemoveDll(DWORD dwId); BOOL RemoveDll(DWORD dwId);
......
...@@ -19,7 +19,7 @@ int _tmain(int nargv, WCHAR* argvs[]) ...@@ -19,7 +19,7 @@ int _tmain(int nargv, WCHAR* argvs[])
} }
else if (nargv == 2) { else if (nargv == 2) {
wStr = argvs[1]; wStr = argvs[1];
Injert(dwPid, argvs[1]); Inject(dwPid, argvs[1]);
} }
else if (nargv == 3 && !((wstring)argvs[1]).compare(L"-r")) { else if (nargv == 3 && !((wstring)argvs[1]).compare(L"-r")) {
wStr = argvs[2]; wStr = argvs[2];
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册