-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathAntiCrack.cpp
More file actions
59 lines (51 loc) · 1.79 KB
/
AntiCrack.cpp
File metadata and controls
59 lines (51 loc) · 1.79 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
#include <iostream>
#include <string>
#include <ctype.h>
#include <Windows.h>
#include <tlhelp32.h>
#include <Shlwapi.h>
#include <thread>
#include <string>
#include <vector>
#include <sstream>
#include <iostream>
#include <fstream>
#include <algorithm>
#include <random>
namespace AntiCrack
{
int getProcID(const std::string& p_name)
{
HANDLE snapshot = CreateToolhelp32Snapshot(TH32CS_SNAPPROCESS, 0);
PROCESSENTRY32 structprocsnapshot = { 0 };
structprocsnapshot.dwSize = sizeof(PROCESSENTRY32);
if (snapshot == INVALID_HANDLE_VALUE)return 0;
if (Process32First(snapshot, &structprocsnapshot) == FALSE)return 0;
while (Process32Next(snapshot, &structprocsnapshot))
{
if (!strcmp(structprocsnapshot.szExeFile, p_name.c_str()))
{
CloseHandle(snapshot);
return structprocsnapshot.th32ProcessID;
}
}
CloseHandle(snapshot);
return 0;
}
bool isProcRunning(std::string process) {
if (getProcID(process) == 0) {
return false;
}
else
{
return true;
}
}
void Tick() {
if (isProcRunning("ida64.exe") || isProcRunning("dotPeek64.exe") || isProcRunning("ida32.exe") || isProcRunning("ida.exe") || isProcRunning("reclass.net.exe") || isProcRunning("reclass.exe") || isProcRunning("heyrays.exe") || isProcRunning("lighthouse.exe") || isProcRunning("cheatengine-x86_64.exe") || isProcRunning("classinformer.exe") || isProcRunning("ida-x86emu.exe") || isProcRunning("cffexplorer.exe") || isProcRunning("winhex.exe") || isProcRunning("hiew.exe") || isProcRunning("fiddler.exe") || isProcRunning("httpdebugger.exe") || isProcRunning("httpdebuggerpro.exe") || isProcRunning("scylla.exe") || isProcRunning("Cheat Engine.exe"))
{
MessageBox(NULL, "Please close any fucking reverse engineering tools and restart the program.", "Error", MB_ICONERROR);
ExitProcess(0);
}
}
}