Results 1 to 4 of 4
  1. #1
    Dwar
    Dwar is offline
    Veteran Dwar's Avatar
    Join Date
    2010 Mar
    Posts
    2,221
    Thanks
    211
    Thanked 2,224 Times in 289 Posts
    Rep Power
    10

    [C++] Signature scanner

    Signature scanner


    Header with functions for searching thru the current application for a certain byte-array (signature).
     /* Syntax                                *
    * *
    * DWORD FindAddress( *
    * BYTE* bMask, *
    * int nLength, *
    * DWORD dwBaseAddress, *
    * DWORD dwLength, *
    * ); *
    * *
    * Parameters *
    * *
    * bMask *
    * Pointer to a BYTE-array holding *
    * the signature to scan for, 0x99 *
    * is wildcard-byte. *
    * *
    * nLength *
    * How many bytes the signature is. *
    * *
    * dwBaseAddress *
    * Address to start searching from. *
    * *
    * dwLength *
    * How many addresses to scan thru. *
    * *
    * *
    * Return *
    * *
    * If successfull, returns the address *
    * that was found. If unsuccessfull, *
    * returns 0. *
    * sigscan.cpp Signature searcher *
    ****************************************/

    //function which checks if current offset is the sig
    bool DataCompare(const BYTE* bData, const BYTE* bMask, int nLength)
    {
    for (int i=0;i<nLength;i++){ //search the whole length
    if((bData[i] != bMask[i]) && (bMask[i] != 0x99)) //if they don't match & the mask is not 0x99
    return false; //they are not equal, return false
    }
    return true; //they are equal, return true
    }

    //function to search for signature
    DWORD FindAddress(BYTE *bMask,int nLength,DWORD dwBaseAddress,DWORD dwLength)
    {
    for(DWORD i=0;i<(dwLength-nLength);i++) //while we're searching
    if( DataCompare( (BYTE*)( dwBaseAddress+i ),bMask,nLength) ) //compare bytes
    return (DWORD)(dwBaseAddress+i); //address found! return it
    return 0; //no address found, return nothing
    }

    Author: Mr. Novocain
    Please, post your questions on forum, not by PM or mail

    I spend my time, so please pay a little bit of your time to keep world in equilibrium

  2. The Following User Says Thank You to Dwar For This Useful Post:


  3. #2
    ILOVEPIE
    ILOVEPIE is offline
    Guest
    Join Date
    2010 Nov
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Rep Power
    0

    Re: [C++] Signature scanner

    How do i scan a whole process?

  4. #3
    Dwar
    Dwar is offline
    Veteran Dwar's Avatar
    Join Date
    2010 Mar
    Posts
    2,221
    Thanks
    211
    Thanked 2,224 Times in 289 Posts
    Rep Power
    10

    Re: [C++] Signature scanner

    ILOVEPIE
    Whole process, like a Cheat Engine do? You should map process memory and then scan each memory block.
    Please, post your questions on forum, not by PM or mail

    I spend my time, so please pay a little bit of your time to keep world in equilibrium

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


  6. #4
    Gwinx
    Gwinx is offline
    Guest
    Join Date
    2011 Jun
    Posts
    2
    Thanks
    2
    Thanked 0 Times in 0 Posts
    Rep Power
    0
    Thanks will be saving this source code as my resource thanks for sharing your great work Dwar, I find your source very useful!

Visitors found this page by searching for:

C signature scanner

C signature scan

sig scanner

signature scan C

signature scanning c

C Signature Scanning

c sigscan

sigscan c

c# signature scansig scan c sigScan c#c memory signatureC# SIGSCANsigscan.cppsigscannerbyte signature scannerSCANNER c C signature searchSIGScanner C byte signature scanningcheat engine signature scanningcsignaturesearch.cppmemory signature scannerC sig scannersignature scan c#

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •