So, lately I have found myself wondering why people don't attempt making new, better hackshields. In general the hackshields out there suck pretty badly.
So, I'm going to make things easier for a couple of you now and release a couple of snippets that can help you out.
PLEASE READ ALL THE TEXT BEFORE ASKING QUESTIONS
I am taking the snippets from the source code of my latest KalOnline project (namely Elmo, a hackshield that's private for KalmaX 2006
(link: KalmaX - 2006 Stuck In Time )).
So, this code is compiled and works fine in Visual C++ 6.0.
I used a proxy dll to run it and well, if you don't know how to do that then I recommend staying away from modding the client anyway lol.
First snippet, most requested so far. How to change icon of kal window after injection:
Code:
hwndWindow = FindWindow(NULL, "KalOnline");
SetWindowText(hwndWindow, "KalOnline - KalmaX 2006 [Protected by Elmo] - Coded by: Justei. Extra credits: MaX");
if(ServerSelected == 0 && IconLoop < 500){
HANDLE hIcon = LoadImage(NULL, "data/sesame/icon.ico", IMAGE_ICON, 32, 32, LR_LOADFROMFILE);
if(hIcon){
SendMessage(hwndWindow, WM_SETICON, ICON_BIG, (LPARAM)hIcon);
}else{
// Insert a logging function or whatever here...
}
HANDLE hIconSm = LoadImage(NULL, "data/sesame/icon.ico", IMAGE_ICON, 16, 16, LR_LOADFROMFILE);
if(hIconSm){
SendMessage(hwndWindow, WM_SETICON, ICON_SMALL, (LPARAM)hIconSm);
}else{
// Insert a logging function or whatever here...
}
IconLoop++;
}
How to check for autobattle
(not sure this works 100%, but the function is good to have in general to fetch info from .ini files).
Code:
char curdir[4096];
char inifile[4096];
GetCurrentDirectory(4000, curdir);
sprintf(inifile, "%s\\system.ini", curdir);
// check for autobattle, sigh...
char autobattle[256];
GetPrivateProfileString("CLIENTVERSION", "AUTO_BATTLE", "null", autobattle, 4000, inifile);
if(strcmp(autobattle, "2") == 0){
// KickPlayer.
}
Check if a file exists, so u can check if ppl put .dll files in the same folder:
Code:
bool FileExist(string FileName) {
struct stat stFileInfo;
bool blnReturn;
int intStat;
intStat = stat(FileName.c_str(),&stFileInfo);
if(intStat == 0) {
blnReturn = true;
} else {
blnReturn = false;
}
return(blnReturn);
}
Check what windows are open:
Code:
char WinText[200] = {NULL};
if(!hwnd || !IsWindowVisible(hwnd))
return 1;
GetWindowTextA(hwnd,WinText,sizeof(WinText));
// Example of how to use.
if(strcmp(WinText, "Let's Engine 3.0 by Be_Sk8 - www.LetsPlayCheats.navega.uni.cc") == 0){
// KickPlayer(); just kick player...
}
HOW TO MAKE YOUR PROXY DLL's TUTORIAL
http://www.codeproject.com/KB/DLL/Cr...ProxyDLLs.aspx
More functions I have in stock are(All work in realtime etc.):
- Check what dll files are loaded into the client
- Check what processes are running
- Check what windows are open
- Check if client is being hooked by another dll (Detoured packets.)
- Check for speedhack.
- MemCpyEx ofc.
- Recv/Send packets without disturbing Kocp/Kosp.
- GM bot check (Lets a gm check a player if he's a BOT etc).
- Make sure player can't remove d4 doors etc.
- Also a d3d hook.
- And a lot more that I don't remember atm...
I will however keep these parts to myself for now, just want to see people develop something and not just leech first, then I can help out if someone can't figure some part of a function out for themselves.
This should get you started at least.
Good Luck!