Skip to content

Commit

Permalink
Remove fakeprime, new CS:GO update renders it obsolete https://blog.c…
Browse files Browse the repository at this point in the history
  • Loading branch information
degeneratehyperbola committed Jun 5, 2021
1 parent ff96130 commit ca76bc9
Show file tree
Hide file tree
Showing 8 changed files with 13 additions and 40 deletions.
4 changes: 1 addition & 3 deletions NEPS/Config.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -708,7 +708,6 @@ static void from_json(const json &j, Config::Griefing &g)
read<value_t::string>(j, "Ban text", g.banText);
read<value_t::object>(j, "Reportbot", g.reportbot);
read<value_t::object>(j, "Blockbot", g.blockbot);
read(j, "Fake prime", g.fakePrime);
read(j, "Vote reveal", g.revealVotes);
read(j, "Spam use", g.spamUse);
}
Expand Down Expand Up @@ -1193,7 +1192,6 @@ static void to_json(json &j, const Config::Griefing &o)
WRITE("Ban text", banText);
WRITE("Reportbot", reportbot);
WRITE("Blockbot", blockbot);
WRITE("Fake prime", fakePrime);
WRITE("Vote reveal", revealVotes);
WRITE("Spam use", spamUse);
}
Expand Down Expand Up @@ -1460,7 +1458,7 @@ void Config::listConfigs() noexcept

std::error_code ec;
std::transform(std::filesystem::directory_iterator{path, ec},
std::filesystem::directory_iterator{ },
std::filesystem::directory_iterator{},
std::back_inserter(configs),
[](const auto &entry) { return std::string{(const char *)entry.path().filename().u8string().c_str()}; });
}
Expand Down
27 changes: 12 additions & 15 deletions NEPS/Config.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,20 +14,25 @@ class Config
{
public:
explicit Config(const char *) noexcept;

bool load(const char8_t *name, bool incremental) noexcept;
bool load(size_t, bool incremental) noexcept;
void save(size_t) const noexcept;
bool load(std::size_t, bool incremental) noexcept;
void save(std::size_t) const noexcept;
void add(const char *) noexcept;
void remove(size_t) noexcept;
void rename(size_t, const char *) noexcept;
void remove(std::size_t) noexcept;
void rename(std::size_t, const char *) noexcept;
void reset() noexcept;
void listConfigs() noexcept;
void openConfigDir() const noexcept;

constexpr auto &getConfigs() noexcept
constexpr auto &getConfigs() noexcept { return configs; }

struct Font
{
return configs;
}
ImFont *tiny;
ImFont *medium;
ImFont *big;
};

struct Aimbot
{
Expand Down Expand Up @@ -149,13 +154,6 @@ class Config
std::unordered_map<std::string, Shared> otherEntities;
} esp;

struct Font
{
ImFont *tiny;
ImFont *medium;
ImFont *big;
};

struct Visuals
{
bool disablePostProcessing = false;
Expand Down Expand Up @@ -318,7 +316,6 @@ class Config
{
bool nameStealer = false;
bool killMessage = false;
bool fakePrime = false;
bool revealVotes = false;
char clanTag[16] = "\0";
int animatedClanTag = 0;
Expand Down
1 change: 0 additions & 1 deletion NEPS/GUI.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2073,7 +2073,6 @@ void GUI::renderGriefingWindow(bool contentOnly) noexcept
if (ImGui::Button("Fake ban", ImVec2{75.0f, 0.0f}))
Misc::fakeBan(true);

ImGui::Checkbox("Fake prime", &config->griefing.fakePrime);
ImGui::Checkbox("Vote reveal", &config->griefing.revealVotes);
ImGui::Checkbox("Name stealer", &config->griefing.nameStealer);
ImGui::Checkbox("Clock tag", &config->griefing.clocktag);
Expand Down
17 changes: 0 additions & 17 deletions NEPS/Hacks/Misc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -937,23 +937,6 @@ void Misc::fixTabletSignal() noexcept
}
}

void Misc::fakePrime() noexcept
{
static bool lastState = false;

if (config->griefing.fakePrime != lastState)
{
lastState = config->griefing.fakePrime;

if (DWORD oldProtect; VirtualProtect(memory->fakePrime, 1, PAGE_EXECUTE_READWRITE, &oldProtect))
{
constexpr uint8_t patch[]{0x74, 0xEB};
*memory->fakePrime = patch[config->griefing.fakePrime];
VirtualProtect(memory->fakePrime, 1, oldProtect, nullptr);
}
}
}

void Misc::killMessage(GameEvent &event) noexcept
{
if (!config->griefing.killMessage)
Expand Down
1 change: 0 additions & 1 deletion NEPS/Hacks/Misc.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ namespace Misc
void changeConVarsFrame(FrameStage stage);
void quickHealthshot(UserCmd *) noexcept;
void fixTabletSignal() noexcept;
void fakePrime() noexcept;
void killMessage(GameEvent &event) noexcept;
void fixMovement(UserCmd *cmd, float yaw) noexcept;
void antiAfkKick(UserCmd *cmd) noexcept;
Expand Down
1 change: 0 additions & 1 deletion NEPS/Hooks.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -338,7 +338,6 @@ static void __stdcall frameStageNotify(FrameStage stage) noexcept
Misc::fixAnimation(lastCmd, sentPacket);
Misc::preserveKillfeed();
Visuals::colorWorld();
Misc::fakePrime();
Misc::forceRelayCluster();
break;
case FrameStage::RENDER_END:
Expand Down
1 change: 0 additions & 1 deletion NEPS/Memory.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@ Memory::Memory() noexcept
viewRender = **reinterpret_cast<ViewRender ***>(findPattern("client", "\x8B\x0D????\xFF\x75\x0C\x8B\x45\x08") + 2);
drawScreenEffectMaterial = relativeToAbsolute<uintptr_t>(findPattern("client", "\xE8????\x83\xC4\x0C\x8D\x4D\xF8") + 1);
submitReport = reinterpret_cast<decltype(submitReport)>(findPattern("client", "\x55\x8B\xEC\x83\xE4\xF8\x83\xEC\x28\x8B\x4D\x08"));
fakePrime = reinterpret_cast<std::uint8_t *>(findPattern("client", "\x17\xF6\x40\x14\x10") - 1);

const auto tier0 = GetModuleHandleW(L"tier0");
debugMsg = reinterpret_cast<decltype(debugMsg)>(GetProcAddress(tier0, "Msg"));
Expand Down
1 change: 0 additions & 1 deletion NEPS/Memory.h
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,6 @@ class Memory
ViewRender *viewRender;
uintptr_t drawScreenEffectMaterial;
std::add_pointer_t<bool __stdcall(const char *, const char *)> submitReport;
uint8_t *fakePrime;
std::add_pointer_t<void __cdecl(const char *msg, ...)> debugMsg;
std::add_pointer_t<void __cdecl(const std::array<std::uint8_t, 4> &color, const char *msg, ...)> conColorMsg;
float *vignette;
Expand Down

0 comments on commit ca76bc9

Please sign in to comment.