Pattern Scanner... :)

Posts 1–15 of 31 · Page 1 of 3
Pattern Scanner... :)
Now that I'm banned this is kinda useless for me, so, here ya go

Just inject on iw5mp.exe and it'll generate a txt file on the dll directory. Don't worry, its undetected.. it doesn't hook anything, just reads memory

 
Source If anyone is interested

Code:
#include <windows.h>
#include <fstream>
#include <stdio.h>
#include <Psapi.h>
#pragma comment(lib, "psapi.lib")

typedef struct pattern{
	char* Name;
	char* Sig;
	char* Mask;
	int Inc;
}Function;

typedef struct p{
	char* Name;
	char* Sig;
	char* Mask;
	int Off;
	int Inc;
}Class;

using namespace std;
ofstream ofile;

char *GetDirectoryFile(char *filename);
void __cdecl add_log (const char * fmt, ...);
char dlldir[320];

void __cdecl add_log ( const char *fmt, ...)
{
    if(ofile != NULL)
    {
        if(!fmt) { return; }


        va_list va_alist;
        char logbuf[256] = {0};


        va_start (va_alist, fmt);
        _vsnprintf (logbuf+strlen(logbuf), sizeof(logbuf) - strlen(logbuf), fmt, va_alist);


        va_end (va_alist); 


        ofile << logbuf;
    }
}

bool Match(const BYTE* pData, const BYTE* bMask, const char* szMask)
{
    for(;*szMask;++szMask,++pData,++bMask)
        if(*szMask == 'x' && *pData!=*bMask ) 
            return false;
    return (*szMask) == NULL;
}

DWORD FindPattern(DWORD dwAddress,DWORD dwLen,BYTE *bMask,char* szMask)
{
    for(DWORD i=0; i < dwLen; i++)
        if( Match( (BYTE*)( dwAddress+i ),bMask,szMask) )
            return (DWORD)(dwAddress+i);


    return 0;
}

MODULEINFO GetModuleInfo( LPCSTR szModule )
{
	MODULEINFO modinfo = {0};
	HMODULE hModule = GetModuleHandle(szModule);
	if(hModule == 0) return modinfo;
	GetModuleInformation(GetCurrentProcess(), hModule, &modinfo, sizeof(MODULEINFO));
	return modinfo;


}

class Scanner{
private:
	Function Sigs[25];
	Class cSigs[25];
	int FunctionsNumber;
	int ClassesNumber;
public:
	Scanner(){ FunctionsNumber = 0; }
	void PrintHeader();
	void Credits();
	void AddFunctionSig(char* Name, char* Sig, char* Mask, int Inc);
	void FindFunctions();
	void AddClassesSig(char* Name, char* Sig, char* Mask, int Off, int Inc);
	void FindClasses();
};

char *GetDirectoryFile(char *filename) 
{
    static char path[320];
    strcpy(path, dlldir);
    strcat(path, filename);
    return path;
}

void Scanner::AddFunctionSig(char* Name, char* Sig, char* Mask, int Inc){
	Sigs[FunctionsNumber].Mask = Mask;
	Sigs[FunctionsNumber].Sig = Sig;
	Sigs[FunctionsNumber].Name = Name;
	Sigs[FunctionsNumber].Inc = Inc;
	FunctionsNumber++;
}

void Scanner::AddClassesSig(char* Name, char* Sig, char* Mask, int Off, int Inc){
	cSigs[ClassesNumber].Mask = Mask;
	cSigs[ClassesNumber].Sig = Sig;
	cSigs[ClassesNumber].Name = Name;
	cSigs[ClassesNumber].Off = Off;
	cSigs[ClassesNumber].Inc = Inc;
	ClassesNumber++;
}

void Scanner::PrintHeader(){
	ofile.open(GetDirectoryFile("Addys.txt"), ios::app);
	add_log("--------------[Auto Generated by -InSaNe- Scanner]---------------\n");


	char Process[512];
	GetModuleBaseName(GetCurrentProcess(), NULL, Process, 512);


	add_log("---------------[Process: %s | %s]----------------\n", Process, __DATE__);
}

void Scanner::FindFunctions(){
	add_log("//Functions\n");
	for(int i = 0 ; i < FunctionsNumber; i++){
		DWORD  m_dwaddy  = FindPattern((DWORD)GetModuleHandleA(NULL), GetModuleInfo(NULL).SizeOfImage,(BYTE*)Sigs[i].Sig,Sigs[i].Mask);
		char Name[64];
		sprintf(Name, "%s.", Sigs[i].Name);
		while(strlen(Name) < 25)
			sprintf(Name, "%s.", Name);
		add_log("%s0x%.8X\n",Name, m_dwaddy + Sigs[i].Inc);
	}
	add_log("\n");
}

void Scanner::FindClasses(){
	add_log("//Classes and Variables\n");
	for(int i = 0 ; i < ClassesNumber; i++){
		DWORD  m_dwaddy  = FindPattern((DWORD)GetModuleHandleA(NULL), GetModuleInfo(NULL).SizeOfImage,(BYTE*)cSigs[i].Sig,cSigs[i].Mask);
		char Name[64];
		sprintf(Name, "%s.", cSigs[i].Name);
		while(strlen(Name) < 25)
			sprintf(Name, "%s.", Name);
		add_log("%s0x%.8X\n",Name, (*(DWORD*)(m_dwaddy+cSigs[i].Off))+cSigs[i].Inc);
	}
	add_log("\n");
}

void Scanner::Credits(){
	add_log("Credits: Me, g0dly, killstreak, barata55, NightmareTX, master131, BaberZz\n");
}

void GetAddresses(Scanner Scan){
	Scan.PrintHeader();

	Scan.AddClassesSig("RefDef", "\xbe\x00\x00\x00\x00\xe8\x00\x00\x00\x00\x5f\x5e\x5d\x83\xc4\x10","x????x????xxxxxx", 0x1, 0);
	Scan.AddClassesSig("CG", "\x68\x00\x00\x00\x00\xe8\x00\x00\x00\x00\x8b\x6c\x24\x28","x????x????xxxx", 0x1, 0);
	Scan.AddClassesSig("CGS", "\x89\x1d\x00\x00\x00\x00\xe8\x00\x00\x00\x00\x83\xc4\x44","xx????x????xxx", 0x2, 0);
	Scan.AddClassesSig("ViewMatrix", "\xb8\x00\x00\x00\x00\xd9\x80\x98\x00\x00\x00","x????xxxxxx", 0x1, 0);
	Scan.AddClassesSig("Entity", "\x69\xc0\x00\x00\x00\x00\x05\x00\x00\x00\x00\x83\xb8\xd4\x00\x00\x00\x01","xx????x????xxxxxxx", 0x7, 0);
	Scan.AddClassesSig("Entity_Size", "\x69\xc0\x00\x00\x00\x00\x05\x00\x00\x00\x00\x83\xb8\xd4\x00\x00\x00\x01","xx????x????xxxxxxx", 0x2, 0);
	Scan.AddClassesSig("ClientInfo", "\x69\xc9\x00\x00\x00\x00\x6a\x00\x81\xc1\x00\x00\x00\x00","xx????xxxx????", 0xA, 0);
	Scan.AddClassesSig("ClientInfo_Size", "\x69\xc9\x00\x00\x00\x00\x6a\x00\x81\xc1\x00\x00\x00\x00","xx????xxxx????", 0x2, 0);
	Scan.AddClassesSig("Input", "\x81\xC6\x00\x00\x00\x00\xB9\x00\x00\x00\x00\xF3\xA5\x5F", "xx????x????xxx", 0x2, 0);
	Scan.AddClassesSig("IsInGame", "\xF7\x05\x00\x00\x00\x00\x00\x00\x00\x00\x75\x24", "xx????????xx", 0x2, 0);
	Scan.AddClassesSig("Advanced UAV", "\x68\x00\x00\x00\x00\xe8\x00\x00\x00\x00\x8b\x6c\x24\x28","x????x????xxxx", 0x1, 0x204);
	Scan.AddClassesSig("Advanced UAV_CVAR", "\xA1\x00\x00\x00\x00\x8A\x48\x0C\x83\xC4\x24", "x????xxxxxx",0x1, 0 );
	Scan.AddClassesSig("Zoom", "\x68\x00\x00\x00\x00\xE8\x00\x00\x00\x00\x83\xC4\x14\x6A\x03", "x????x????xxxxx", 0x1, 0);
	Scan.AddClassesSig("FullBright", "\xC7\x05\x00\x00\x00\x00\x00\x00\x00\x00\xC7\x05\x00\x00\x00\x00\x00\x00\x00\x00\xC7\x05\x00\x00\x00\x00\x00\x00\x00\x00\xE9", "xx????????xx????????xx????????x", 0x2, 0x4);
	Scan.AddClassesSig("NoFog", "\xC7\x05\x00\x00\x00\x00\x00\x00\x00\x00\xC7\x05\x00\x00\x00\x00\x00\x00\x00\x00\xC7\x05\x00\x00\x00\x00\x00\x00\x00\x00\xE9", "xx????????xx????????xx????????x", 0x2, 0x8);
	Scan.AddClassesSig("MagicNumber", "\xa1\x00\x00\x00\x00\x8d\x94\x24\x04\x08\x00\x00\x52\x56\x50\x68\x00\x00\x00\x00\xe8\x00\x00\x00\x00\x8b\x8c\x24\x18\x0c\x00\x00\x50\x51\xe8\x00\x00\x00\x00\x83\xc4\x18", "x????xxxxxxxxxxx????x????xxxxxxxxxx????xxx", 0x1, 0);
	Scan.AddClassesSig("GetWeaponName", "\x8B\x80\x00\x00\x00\x00\x89\x4C\x24\x14", "xx????xxxx", 0x2, 0);
	Scan.AddClassesSig("ClanTag_Byte", "\xC6\x86\x00\x00\x00\x00\x00\xE8\x00\x00\x00\x00\x6A\x05", "xx?????x????xx", 0x2, 0);
	Scan.AddClassesSig("ClanTag_Text", "\xC6\x86\x00\x00\x00\x00\x00\xE8\x00\x00\x00\x00\x6A\x05", "xx?????x????xx", 0x2, 21);
	Scan.AddClassesSig("Title_Byte", "\xC6\x86\x00\x00\x00\x00\x00\xC6\x86\x00\x00\x00\x00\x00\xE8\x00\x00\x00\x00\x6A\x05", "xx?????xx?????x????xx", 0x2, 0);
	Scan.AddClassesSig("Title_Text", "\xC6\x86\x00\x00\x00\x00\x00\xC6\x86\x00\x00\x00\x00\x00\xE8\x00\x00\x00\x00\x6A\x05", "xx?????xx?????x????xx", 0x2, 1);
	Scan.AddClassesSig("Title", "\xC7\x86\x00\x00\x00\x00\x00\x00\x00\x00\xC6\x86\x00\x00\x00\x00\x00\xC6\x86\x00\x00\x00\x00\x00\xE8", "xx????????xx?????xx?????x", 0x2, 0);
	Scan.FindClasses();
		
	Scan.AddFunctionSig("RegisterFont", "\x8b\x44\x24\x04\x6a\x01\x50\x6a\x18", "xxxxxxxxx", 0);
	Scan.AddFunctionSig("RegisterShader", "\x8b\x44\x24\x04\x80\x38\x00\x75\x00","xxxxxxxx?", 0);
	Scan.AddFunctionSig("EngineText", "\x8b\x44\x24\x04\x80\x38\x00\x0f\x84\x00\x00\x00\x00","xxxxxxxxx????", 0);
	Scan.AddFunctionSig("StrWidth", "\x51\x53\x57\x33\xdb","xxxxx", 0);
	Scan.AddFunctionSig("StrHeight", "\x8B\x44\x24\x04\x8B\x40\x04", "xxxxxxx", 0);
	Scan.AddFunctionSig("CG_Trace", "\x8B\x44\x24\x14\x8B\x4C\x24\x10\x8B\x54\x24\x08", "xxxxxxxxxxxx", 0);
	Scan.AddFunctionSig("IsVisible", "\x8B\x4C\x24\x08\x8B\x81\x00\x00\x00\x00\x69\xC0", "xxxxxx????xx", 0);
	Scan.AddFunctionSig("GetPlayerTag", "\x8b\x8e\xd0\x00\x00\x00\x50\x51\xe8\x00\x00\x00\x00\x83\xc4\x08\x85\xc0\x75\x00\xc3","xxxxxxxxx????xxxxxx?x", 0);
	Scan.AddFunctionSig("RegisterTag", "\x8B\x44\x24\x04\x6A\x01\x50\xE8\x00\x00\x00\x00\x83\xC4\x08\xC3", "xxxxxxxx????xxxx", 0);
	Scan.AddFunctionSig("NoRecoil", "\xE8\x00\x00\x00\x00\x83\xC4\x14\x8B\x44\x24\x40\x8B\x4C\x24\x10","x????xxxxxxxxxxx", 0);
	Scan.AddFunctionSig("GetScreenMatrix", "\xA1\x00\x00\x00\x00\x83\xF8\x03\x77\x0D","x????xxxxx", 0);
	Scan.AddFunctionSig("WorldToScreen", "\x83\xEC\x0C\x8B\x44\x24\x18\xD9\x00","xxxxxxxxx", 0);
	Scan.AddFunctionSig("CG_Draw2D ", "\x56\x8B\x74\x24\x08\x56\xE8\x00\x00\x00\x00\x83\xC4\x04\x83\x3D","xxxxxxx????xxxxx", 0);
	Scan.AddFunctionSig("UI.ShowList", "\xA1\x00\x00\x00\x00\x81\xEC\x00\x00\x00\x00\x80\x78\x0C\x00\x74\x29", "x????xx????xxxxxx", 0);
	Scan.AddFunctionSig("SendCommandToConsole", "\x6A\x1F\xE8\x00\x00\x00\x00\x8B\x44\x24\x0C", "xxx????xxxx", 0);
	Scan.AddFunctionSig("DrawRotatedPic", "\x83\xEC\x50\xD9\x44\x24\x68","xxxxxxx", 0);
	Scan.AddFunctionSig("ProcessCommand", "\x6A\x1F\xE8\x00\x00\x00\x00\x8B\x44\x24\x0C", "xxx????xxxx", 0);
	Scan.AddFunctionSig("BulletPenetration","\x81\xEC\x00\x00\x00\x00\x53\x8B\x9C\x24\x00\x00\x00\x00\x55\x8B\xAC\x24\x00\x00\x00\x00\x56\x57\x83\xFB\xFF","xx????xxxx????xxxx????xxxxx", 0);
	Scan.AddFunctionSig("BulletPenetrationCheck","\x83\xEC\x5C\x57\x8B\xF8","xxxxxx", 0);
	Scan.AddFunctionSig("DisableBulletImpacts", "\x8B\x4C\x24\x10\x8B\x44\x24\x24\x55", "xxxxxxxxx", 0);
	Scan.AddFunctionSig("NightmareTX No-Recoil", "\xD8\x00\xDC\x0D", "xxxx", 0);
	Scan.AddFunctionSig("Gun Laser", "\x74\x25\x8B\x0F\x8B\x54\x24\x78", "xxxxxxxx", 1);
	Scan.FindFunctions();

	Scan.Credits();
}
BOOL WINAPI DllMain( HMODULE hMod, DWORD dwReason, LPVOID lpReserved ){
	if( dwReason == DLL_PROCESS_ATTACH )
    {
		Scanner Scan;
		GetModuleFileName(hMod, dlldir, 512);
		for(int i = strlen(dlldir); i > 0; i--){ 
			if(dlldir[i] == '\\'){
				dlldir[i+1] = 0;
				break;
			}
		}
		GetAddresses(Scan);
    }
}


PS: keep in mind some patterns might be wrong...

https://www.virustotal.com/file/08f6...is/1353417804/
http://virusscan.jotti.org/en/scanre...f13a2f30bc5615

Just give me credits if you use this or any patterns on it and I'll be happy

Credits: Me, g0dly, killstreak, barata55, NightmareTX, master131, BaberZz
PatternFinder_mpgh.net.rar12 KB · 258 downloads Scanning…
How were you banned?
Quote Originally Posted by archit View Post
How were you banned?
My aimbot got detected...
TEH PATTTERN SCANNER!!!!
I have my own :P But....I shall steal some patterns xP
Quote Originally Posted by MarkHC View Post
Just give me credits if you use this or any patterns on it and I'll be happy
And you give no credit to others?
Wonder why you credited others on your release, and not when using this :P

Else your ESP should be very easy to do and only 1-2 people to credit :S

Well, I suppose I understand this wrong then...
Quote Originally Posted by Jorndel View Post


And you give no credit to others?
Wonder why you credited others on your release, and not when using this :P

Else your ESP should be very easy to do and only 1-2 people to credit :S

Well, I suppose I understand this wrong then...
You're mean! >.<
LoL But....gotta say I agree....Hackers are greedy mofos and don't like to share. Well usually.
I guess that's why.
Quote Originally Posted by Jorndel View Post


And you give no credit to others?
Wonder why you credited others on your release, and not when using this :P

Else your ESP should be very easy to do and only 1-2 people to credit :S

Well, I suppose I understand this wrong then...
If you look at the source, you'll see there are credits. I just forgot to add them to the thread. And I always give credits when I release a address using this tool (when I remember to do so ofc). Look at my last posts on the Address Thread

PS: There. Added them now.

Quote Originally Posted by Kenshin13 View Post
LoL But....gotta say I agree....Hackers are greedy mofos and don't like to share. Well usually.
I guess that's why.
¬.¬
I'll use it and not give credits, muhahaha. >:'D
Quote Originally Posted by Geometrical View Post
I'll use it and not give credits, muhahaha. >:'D
Like usual you mean? :3 jk. Maybe
Quote Originally Posted by Kenshin13 View Post
Like usual you mean? :3 jk. Maybe
Just kidding, I don't know how to use this so I wont
Quote Originally Posted by Geometrical View Post
Just kidding, I don't know how to use this so I wont
Not very useful unless you make an external ESP with them. (C#)
Very useful if you make internal hacks.
Clientinfo_size and entityinfo_size ,I can't get a value from them
Quote Originally Posted by archit View Post
Clientinfo_size and entityinfo_size ,I can't get a value from them
:S u sure?

PS: The values for those addys are not offsets.. its just a integer, the size of the struct. From what I remember, Entity is 0x1F8 and ClientInfo is 0x650 (or 0x560)
Quote Originally Posted by Geomatrical the 7th View Post
I inject it but no .txt file help?
Did the module load? Check for it in ollydbg.
Posts 1–15 of 31 · Page 1 of 3

Post a Reply

Similar Threads

Tags for this Thread

None

Need help?