Results 1 to 6 of 6
  1. #1
    kenjifurry's Avatar
    Join Date
    Oct 2015
    Gender
    male
    Location
    Meme
    Posts
    250
    Reputation
    10
    Thanks
    969
    My Mood
    Aggressive

    signature_scanner source code for this can anybody help me chack this by Jabberwock

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

    // Usage: unsigned long address = signature_scanner->search("3AB2DFAB????????3FBACD300200A1XXXXXXXXB1C 4DA");
    // X is the address
    // ? is a wildcard

    class signature_scanner
    {
    private:
    unsigned long BaseAddress;
    unsigned long ModuleSize;

    public:
    signature_scanner()
    {
    //SYSTEM_INFO info;
    //GetSystemInfo(&info);
    //this->BaseAddress = (unsigned long)info.lpMinimumApplicationAddress;

    // Could be injected earlier than expected

    while (!(this->BaseAddress = (unsigned long)GetModuleHandle(NULL)))
    Sleep(100);

    // Getting size of image

    MODULEINFO modinfo;

    while (!GetModuleInformation(GetCurrentProcess(), GetModuleHandle(NULL), &modinfo, sizeof(MODULEINFO)))
    Sleep(100);

    this->ModuleSize = modinfo.SizeOfImage;

    // Wait for the application to finish loading

    MEMORY_BASIC_INFORMATION meminfo;

    while (true)
    {
    if (VirtualQuery((void*)this->ModuleSize, &meminfo, sizeof(MEMORY_BASIC_INFORMATION)))
    if (!(meminfo.Protect &PAGE_EXECUTE_WRITECOPY))
    break;

    Sleep(100);
    }
    }

    unsigned long search(const char* string, unsigned short offset=0)
    {
    unsigned int p_length = strlen(string);// Pattern's length

    if (p_length % 2 != 0 || p_length < 2 || !this->BaseAddress || !this->ModuleSize) return NULL;// Invalid operation

    unsigned short length = p_length / 2;// Number of bytes

    // The buffer is storing the real bytes' values after parsing the string
    unsigned char* buffer = new unsigned char[length];
    SecureZeroMemory(buffer, length);

    // Copy of string

    char* pattern = new char[p_length+1];// +1 for the null terminated string
    ZeroMemory(pattern, p_length+1);
    strcpy_s(pattern, p_length+1, string);
    _strupr_s(pattern, p_length+1);

    // Set vars

    unsigned char f_byte;
    unsigned char s_byte;

    // Parsing of string

    for (unsigned short z = 0; z < length; z++)
    {
    f_byte = pattern[z*2];// First byte
    s_byte = pattern[(z*2)+1];// Second byte

    if ( ( (f_byte <= 'F' && f_byte >= 'A') || (f_byte <= '9' && f_byte >= '0') ) && ( (s_byte <= 'F' && s_byte >= 'A') || (s_byte <= '9' && s_byte >= '0') ) )
    {
    if (f_byte <= '9') buffer[z] += f_byte - '0';
    else buffer[z] += f_byte - 'A' + 10;
    buffer[z] *= 16;
    if (s_byte <= '9') buffer[z] += s_byte - '0';
    else buffer[z] += s_byte - 'A' + 10;
    }
    else if (f_byte == 'X' || s_byte == 'X') buffer[z] = 'X';
    else buffer[z] = '?';// Wildcard
    }

    // Remove buffer

    delete[] pattern;

    // Start searching

    unsigned short x;
    unsigned long i = this->BaseAddress;
    MEMORY_BASIC_INFORMATION meminfo;
    unsigned long EOR;

    while (i < this->ModuleSize)
    {
    VirtualQuery((void*)i, &meminfo, sizeof(MEMORY_BASIC_INFORMATION));

    if (!(meminfo.Protect &PAGE_EXECUTE_READWRITE))// Good for AVA for now
    {// !(meminfo.Protect &(PAGE_READWRITE | PAGE_WRITECOPY | PAGE_EXECUTE_READWRITE | PAGE_EXECUTE_WRITECOPY)) || !(meminfo.State &MEM_COMMIT)
    i += meminfo.RegionSize;
    continue;
    }

    EOR = i + meminfo.RegionSize;

    for (; i < EOR; i++)
    {
    for (x = 0; x < length; x++)
    if (buffer[x] != ((unsigned char*)i)[x] && buffer[x] != '?' && buffer[x] != 'X')
    break;

    if (x == length)
    {
    delete[] buffer;
    const char* s_offset = strstr(string, "X");

    if (s_offset != NULL)
    return *(unsigned long*)&((unsigned char*)i)[length - strlen(s_offset) / 2];
    else
    return *(unsigned long*)&((unsigned char*)i)[length + offset];
    }
    }
    }

    // Didn't find anything

    delete[] buffer;
    return NULL;
    }
    };



    [IMG]https://www.dooomca*****m/alison/stockgroup.jpg[/IMG]
    [IMG]https://www.dooomca*****m/alison/ad_Neat_min.jpg[/IMG]
    [IMG]https://www.dooomca*****m/alison/SStotoro.jpg[/IMG]
    [IMG]https://dooomca*****m/webcomic/BNbio.jpg[/IMG]


  2. The Following 2 Users Say Thank You to kenjifurry For This Useful Post:

    killerleong (12-05-2016),kokzhaoyu2 (12-08-2016)

  3. #2
    killerleong's Avatar
    Join Date
    May 2016
    Gender
    male
    Posts
    22
    Reputation
    10
    Thanks
    1
    very crazy thanks nice nice nice

  4. #3
    Minerva's Avatar
    Join Date
    Dec 2012
    Gender
    male
    Posts
    2,152
    Reputation
    380
    Thanks
    7,740
    My Mood
    Relaxed
    Hi @kenjifurry
    Honestly, you need improving your english and try be more especific in your question, bcuz, you keep making threads about random source codes, I guess that you dont have a minimum knowledge for at less ask something about programming.

    So, be more precise when asking, showing errors, bugs or detailing what you dont know, and then maybe some programmers will help you.

  5. The Following User Says Thank You to Minerva For This Useful Post:

    kenjifurry (12-05-2016)

  6. #4
    RuShi's Avatar
    Join Date
    Jan 2016
    Gender
    male
    Location
    File Not Found 404!
    Posts
    2,531
    Reputation
    210
    Thanks
    13,009
    My Mood
    Innocent
    What do you want to check? This is not complete source.

    Code:
    #pragma once
    #include <windows.h>
    #include <psapi.h>
    #pragma comment(lib, "psapi.lib")
    #include <stdio.h>
    
    // Usage: unsigned long address = signature_scanner->search("3AB2DFAB????????3FBACD300200A1XXXXXXXXB1C4DA");
    // X is the address
    // ? is a wildcard
    
    class signature_scanner
    {
    private:
    	unsigned long BaseAddress;
    	unsigned long ModuleSize;
    
    public:
    	signature_scanner()
    	{
    		//SYSTEM_INFO info;
    		//GetSystemInfo(&info);
    		//this->BaseAddress = (unsigned long)info.lpMinimumApplicationAddress;
    
    		// Could be injected earlier than expected
    
    		while (!(this->BaseAddress = (unsigned long)GetModuleHandle(NULL)))
    			Sleep(100);
    
    		// Getting size of image
    
    		MODULEINFO modinfo;
    
    		while (!GetModuleInformation(GetCurrentProcess(), GetModuleHandle(NULL), &modinfo, sizeof(MODULEINFO)))
    			Sleep(100);
    
    		this->ModuleSize = modinfo.SizeOfImage;
    
    		// Wait for the application to finish loading
    
    		MEMORY_BASIC_INFORMATION meminfo;
    
    		while (true)
    		{
    			if (VirtualQuery((void*)this->ModuleSize, &meminfo, sizeof(MEMORY_BASIC_INFORMATION)))
    				if (!(meminfo.Protect &PAGE_EXECUTE_WRITECOPY))
    					break;
    
    			Sleep(100);
    		}
    	}
    
    	unsigned long search(const char* string, unsigned short offset=0)
    	{
    		unsigned int p_length = strlen(string);// Pattern's length
    
    		if (p_length % 2 != 0 || p_length < 2 || !this->BaseAddress || !this->ModuleSize) return NULL;// Invalid operation
    
    		unsigned short length = p_length / 2;// Number of bytes
    
    		// The buffer is storing the real bytes' values after parsing the string
    		unsigned char* buffer = new unsigned char[length];
    		SecureZeroMemory(buffer, length);
    
    		// Copy of string
    
    		char* pattern = new char[p_length+1];// +1 for the null terminated string
    		ZeroMemory(pattern, p_length+1);
    		strcpy_s(pattern, p_length+1, string);
    		_strupr_s(pattern, p_length+1);
    
    		// Set vars
    
    		unsigned char f_byte;
    		unsigned char s_byte;
    
    		// Parsing of string
    
    		for (unsigned short z = 0; z < length; z++)
    		{
    			f_byte = pattern[z*2];// First byte
    			s_byte = pattern[(z*2)+1];// Second byte
    
    			if ( ( (f_byte <= 'F' && f_byte >= 'A') || (f_byte <= '9' && f_byte >= '0') ) && ( (s_byte <= 'F' && s_byte >= 'A') || (s_byte <= '9' && s_byte >= '0') ) )
    			{
    				if (f_byte <= '9') buffer[z] += f_byte - '0';
    				else buffer[z] += f_byte - 'A' + 10;
    				buffer[z] *= 16;
    				if (s_byte <= '9') buffer[z] += s_byte - '0';
    				else buffer[z] += s_byte - 'A' + 10;
    			}
    			else if (f_byte == 'X' || s_byte == 'X') buffer[z] = 'X';
    			else buffer[z] = '?';// Wildcard
    		}
    
    		// Remove buffer
    
    		delete[] pattern;
    
    		// Start searching
    		
    		unsigned short x;
    		unsigned long i = this->BaseAddress;
    		MEMORY_BASIC_INFORMATION meminfo;
    		unsigned long EOR;
    		
    		while (i < this->ModuleSize)
    		{
    			VirtualQuery((void*)i, &meminfo, sizeof(MEMORY_BASIC_INFORMATION));
    
    			if (!(meminfo.Protect &PAGE_EXECUTE_READWRITE))//
    			{ !(meminfo.Protect &(PAGE_READWRITE | PAGE_WRITECOPY | PAGE_EXECUTE_READWRITE | PAGE_EXECUTE_WRITECOPY)) || !(meminfo.State &MEM_COMMIT)
    				i += meminfo.RegionSize;
    				continue;
    			}
    
    			EOR = i + meminfo.RegionSize;
    
    			for (; i < EOR; i++)
    			{
    				for (x = 0; x < length; x++)
    					if (buffer[x] != ((unsigned char*)i)[x] && buffer[x] != '?' && buffer[x] != 'X')
    						break;
    
    				if (x == length)
    				{
    					delete[] buffer;
    					const char* s_offset = strstr(string, "X");
    
    					if (s_offset != NULL)
    						return *(unsigned long*)&((unsigned char*)i)[length - strlen(s_offset) / 2];
    					else
    						return *(unsigned long*)&((unsigned char*)i)[length + offset];
    				}
    			}
    		}
    		
    		// Didn't find anything
    
    		delete[] buffer;
    		return NULL;
    	}
    };


    MPGH History:
    Member: 02/1/2016
    Contributor: 29/6/2016
    Minion: 25/8/2016
    Former Staff: 07/02/2017
    Minion: 21/9/2017

  7. #5
    kenjifurry's Avatar
    Join Date
    Oct 2015
    Gender
    male
    Location
    Meme
    Posts
    250
    Reputation
    10
    Thanks
    969
    My Mood
    Aggressive
    @Luffy @Minerva /close



    [IMG]https://www.dooomca*****m/alison/stockgroup.jpg[/IMG]
    [IMG]https://www.dooomca*****m/alison/ad_Neat_min.jpg[/IMG]
    [IMG]https://www.dooomca*****m/alison/SStotoro.jpg[/IMG]
    [IMG]https://dooomca*****m/webcomic/BNbio.jpg[/IMG]


  8. The Following User Says Thank You to kenjifurry For This Useful Post:

    kokzhaoyu2 (12-08-2016)

  9. #6
    Minerva's Avatar
    Join Date
    Dec 2012
    Gender
    male
    Posts
    2,152
    Reputation
    380
    Thanks
    7,740
    My Mood
    Relaxed
    Thread Closed as requested.
    /Unresolved.

Similar Threads

  1. [Help Request] Can anybody help me with this problem?
    By AFzero in forum Alliance of Valiant Arms (AVA) Help
    Replies: 0
    Last Post: 12-14-2014, 04:39 AM
  2. [Help Request] Can someone help me with this code
    By L33tHaxorCod3r in forum Minecraft Help
    Replies: 3
    Last Post: 07-16-2012, 11:48 AM
  3. [Request] Can Someone Check This Source Code For 1hit ZM?
    By BryanVB in forum CrossFire Hack Coding / Programming / Source Code
    Replies: 4
    Last Post: 11-12-2011, 03:51 PM
  4. [Help Request] can anyone help me make this mod? for cleric
    By ariefariq2 in forum Dragon Nest Help
    Replies: 3
    Last Post: 09-23-2011, 11:07 AM
  5. Source Codes For Coders (hope that help!!)
    By [U]lixa in forum CrossFire Discussions
    Replies: 39
    Last Post: 03-15-2010, 02:30 AM