Skip to content

Commit ac048e3

Browse files
committed
Renamed main icon
Updated version Fixed build errors Added support for relative and absolute DLL paths Removed manifest option for administrative rights
1 parent 87324b2 commit ac048e3

File tree

5 files changed

+22
-15
lines changed

5 files changed

+22
-15
lines changed

Injector/Injector.rc

1.88 KB
Binary file not shown.

Injector/Injector.vcxproj

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -113,8 +113,8 @@
113113
<EnablePREfast>true</EnablePREfast>
114114
</ClCompile>
115115
<Link>
116-
<AdditionalDependencies>DbgHelp.lib;%(AdditionalDependencies)</AdditionalDependencies>
117-
<UACExecutionLevel>RequireAdministrator</UACExecutionLevel>
116+
<AdditionalDependencies>DbgHelp.lib;shlwapi.lib;%(AdditionalDependencies)</AdditionalDependencies>
117+
<UACExecutionLevel>AsInvoker</UACExecutionLevel>
118118
<GenerateDebugInformation>false</GenerateDebugInformation>
119119
<SubSystem>Console</SubSystem>
120120
<OptimizeReferences>true</OptimizeReferences>
@@ -144,8 +144,8 @@
144144
<EnablePREfast>true</EnablePREfast>
145145
</ClCompile>
146146
<Link>
147-
<AdditionalDependencies>DbgHelp.lib;%(AdditionalDependencies)</AdditionalDependencies>
148-
<UACExecutionLevel>RequireAdministrator</UACExecutionLevel>
147+
<AdditionalDependencies>DbgHelp.lib;shlwapi.lib;%(AdditionalDependencies)</AdditionalDependencies>
148+
<UACExecutionLevel>AsInvoker</UACExecutionLevel>
149149
<GenerateDebugInformation>false</GenerateDebugInformation>
150150
<SubSystem>Console</SubSystem>
151151
<OptimizeReferences>true</OptimizeReferences>
@@ -179,8 +179,8 @@
179179
<EnablePREfast>false</EnablePREfast>
180180
</ClCompile>
181181
<Link>
182-
<AdditionalDependencies>DbgHelp.lib;%(AdditionalDependencies)</AdditionalDependencies>
183-
<UACExecutionLevel>RequireAdministrator</UACExecutionLevel>
182+
<AdditionalDependencies>DbgHelp.lib;shlwapi.lib;%(AdditionalDependencies)</AdditionalDependencies>
183+
<UACExecutionLevel>AsInvoker</UACExecutionLevel>
184184
<GenerateDebugInformation>false</GenerateDebugInformation>
185185
<SubSystem>Console</SubSystem>
186186
<OptimizeReferences>true</OptimizeReferences>
@@ -213,8 +213,8 @@
213213
<EnablePREfast>false</EnablePREfast>
214214
</ClCompile>
215215
<Link>
216-
<AdditionalDependencies>DbgHelp.lib;%(AdditionalDependencies)</AdditionalDependencies>
217-
<UACExecutionLevel>RequireAdministrator</UACExecutionLevel>
216+
<AdditionalDependencies>DbgHelp.lib;shlwapi.lib;%(AdditionalDependencies)</AdditionalDependencies>
217+
<UACExecutionLevel>AsInvoker</UACExecutionLevel>
218218
<GenerateDebugInformation>true</GenerateDebugInformation>
219219
<SubSystem>Console</SubSystem>
220220
<OptimizeReferences>true</OptimizeReferences>
@@ -241,7 +241,7 @@
241241
<ResourceCompile Include="Injector.rc" />
242242
</ItemGroup>
243243
<ItemGroup>
244-
<None Include="1289035833_agt_virus-off.ico" />
244+
<Image Include="favicon.ico" />
245245
</ItemGroup>
246246
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
247247
<ImportGroup Label="ExtensionTargets">

Injector/Injector.vcxproj.filters

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,8 +57,8 @@
5757
</ResourceCompile>
5858
</ItemGroup>
5959
<ItemGroup>
60-
<None Include="1289035833_agt_virus-off.ico">
60+
<Image Include="favicon.ico">
6161
<Filter>Resource Files</Filter>
62-
</None>
62+
</Image>
6363
</ItemGroup>
6464
</Project>

Injector/Main.cpp

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
#include <Windows.h>
1010
#include <tchar.h>
1111
#include <TlHelp32.h>
12+
#include <Shlwapi.h>
1213

1314
// C++ Standard Library
1415
#include <iostream>
@@ -68,8 +69,14 @@ int _tmain(int argc, TCHAR** argv)
6869
switch (c)
6970
{
7071
case OptModuleName:
71-
// ModulePath = Injector::Get()->GetPath(optarg);
72-
ModulePath = optarg;
72+
if (PathIsRelative(optarg))
73+
{
74+
ModulePath = Injector::Get()->GetPath(optarg);
75+
}
76+
else
77+
{
78+
ModulePath = optarg;
79+
}
7380
break;
7481
// Find and inject via process name
7582
case FindProcName:
@@ -138,8 +145,8 @@ int _tmain(int argc, TCHAR** argv)
138145
std::tcout << _T("--process-id 7968") << std::endl;
139146
std::tcout << _T("\tIdentifies the target process by it's PID.")
140147
<< std::endl << std::endl;
141-
std::tcout << _T("--module-name C:\\temp\\mylib.dll") << std::endl;
142-
std::tcout << _T("\tSets the absolute path of the DLL to be in-/ejected.")
148+
std::tcout << _T("--module-name mylib.dll") << std::endl;
149+
std::tcout << _T("\tSets the path (or name only) of the DLL to be in-/ejected.")
143150
<< std::endl << std::endl;
144151
std::tcout << _T("--inject or --eject") << std::endl;
145152
std::tcout << _T("\tSpecifies the action to perform (inject or eject the DLL).")
File renamed without changes.

0 commit comments

Comments
 (0)