Skip to content

Commit

Permalink
Fixed #19
Browse files Browse the repository at this point in the history
Bumped version to 1.2.0
Updated copyright information
  • Loading branch information
nefarius committed Aug 13, 2023
1 parent cedf9c4 commit 662fae1
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 4 deletions.
5 changes: 3 additions & 2 deletions Injector/Injector.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -108,8 +108,9 @@ void Injector::EjectLib(DWORD ProcID, const std::wstring& Path)
{
std::wstring ModuleName(ModEntry.szModule);
std::wstring ExePath(ModEntry.szExePath);
Found = (ModuleName == Path || ExePath == Path);
if (Found) break;
Found = (icompare(ModuleName, Path) || icompare(ExePath, Path));
if (Found)
break;
}
if (!Found)
throw std::runtime_error("Could not find module in remote process.");;
Expand Down
20 changes: 20 additions & 0 deletions Injector/Injector.h
Original file line number Diff line number Diff line change
Expand Up @@ -44,4 +44,24 @@ class Injector
private:
// Singleton
static Injector* m_pSingleton;

//
// Case-insensitive string comparison utility functions
//

static bool icompare_pred(unsigned char a, unsigned char b)
{
return std::tolower(a) == std::tolower(b);
}

bool icompare(std::wstring const& a, std::wstring const& b) const
{
if (a.length() == b.length()) {
return std::equal(b.begin(), b.end(),
a.begin(), icompare_pred);
}
else {
return false;
}
}
};
Binary file modified Injector/Injector.rc
Binary file not shown.
4 changes: 2 additions & 2 deletions Injector/Main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -33,15 +33,15 @@ int main(int, char* argv[])
SehGuard Guard;

// Injector version number
const std::tstring VerNum(_T("20190819"));
const std::tstring VerNum(_T("20230813"));

// Version and copyright output
#ifdef _WIN64
std::tcout << _T("Injector x64 [Version ") << VerNum << _T("]") << std::endl;
#else
std::tcout << _T("Injector x86 [Version ") << VerNum << _T("]") << std::endl;
#endif
std::tcout << _T("Copyright (c) 2009 Cypher, 2012-2019 Nefarius. All rights reserved.") << std::endl << std::endl;
std::tcout << _T("Copyright (c) 2009 Cypher, 2012-2023 Nefarius. All rights reserved.") << std::endl << std::endl;

argh::parser cmdl;

Expand Down

0 comments on commit 662fae1

Please sign in to comment.