Skip to content

Commit

Permalink
Merge pull request #4 from zun1uwu/main
Browse files Browse the repository at this point in the history
Adds support for Waterfox
  • Loading branch information
AdvDebug authored Jul 10, 2023
2 parents 9c0df9b + f971aee commit da5e545
Showing 1 changed file with 18 additions and 3 deletions.
21 changes: 18 additions & 3 deletions NoMoreCookies/NoMoreCookies/dllmain.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,12 @@ bool IsBrowser(char* FileName)
{
return true;
}

if (hasEnding(FileName, "waterfox.exe") && Signed)
{
return true;
}

return false;
}

Expand Down Expand Up @@ -241,6 +247,7 @@ std::wstring ChromePath;
std::wstring FirefoxPath;
std::wstring YandexPath;
std::wstring OperaPath;
std::wstring WaterfoxPath;

BOOL Startup()
{
Expand All @@ -263,6 +270,8 @@ BOOL Startup()
YandexPath.append(L"AppData\\Local\\Yandex\\YandexBrowser\\User Data");
OperaPath = UserPath.c_str();
OperaPath.append(L"AppData\\Roaming\\Opera Software\\Opera Stable");
WaterfoxPath = UserPath.c_str();
WaterfoxPath.append(L"AppData\\Roaming\\Waterfox\\Profiles");
return true;
}
else
Expand All @@ -274,7 +283,13 @@ BOOL Startup()
BOOL IsBlacklistedPath(LPCWSTR FilePath)
{
std::wstring WFilePath(FilePath);
if (WFilePath.rfind(EdgePath.c_str(), 0) == 0 || WFilePath.rfind(BravePath.c_str(), 0) == 0 || WFilePath.rfind(ChromePath.c_str(), 0) == 0 || WFilePath.rfind(FirefoxPath.c_str(), 0) == 0 || WFilePath.rfind(YandexPath.c_str(), 0) == 0 || WFilePath.rfind(OperaPath.c_str(), 0) == 0)
if (WFilePath.rfind(EdgePath.c_str(), 0) == 0 ||
WFilePath.rfind(BravePath.c_str(), 0) == 0 ||
WFilePath.rfind(ChromePath.c_str(), 0) == 0 ||
WFilePath.rfind(FirefoxPath.c_str(), 0) == 0 ||
WFilePath.rfind(YandexPath.c_str(), 0) == 0 ||
WFilePath.rfind(OperaPath.c_str(), 0) == 0 ||
WFilePath.rfind(WaterfoxPath.c_str(), 0) == 0)
{
return true;
}
Expand All @@ -292,7 +307,7 @@ NTSTATUS NTAPI HookedNtCreateFile(PHANDLE FileHandle, ACCESS_MASK DesiredAccess,
{
if (!AlreadyShown)
{
std::wstring NotificationString(L"NoMoreCookies: The Process tried to Access a Restriced Browser Path, which was denied successfully.");
std::wstring NotificationString(L"NoMoreCookies: A process tried to access a restricted browser path, which was denied successfully.");
ShowNotification(NotificationString);
AlreadyShown = TRUE;
}
Expand Down Expand Up @@ -451,4 +466,4 @@ BOOL APIENTRY DllMain(HMODULE hModule, DWORD ul_reason_for_call, LPVOID lpReserv
}
}
return TRUE;
}
}

0 comments on commit da5e545

Please sign in to comment.