Raised This Month: $ Target: $400
 0% 

Patching memory


Post New Thread Reply   
 
Thread Tools Display Modes
Bos93
Veteran Member
Join Date: Jul 2010
Old 02-10-2013 , 07:31   Re: Patching memory
Reply With Quote #31

CheckMapConditions and CheckWinConditions worked

But if the round is over for this HasRoundTimeExpired,but there is no signature
__________________
Bos93 is offline
Send a message via ICQ to Bos93 Send a message via Skype™ to Bos93
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 02-10-2013 , 07:54   Re: Patching memory
Reply With Quote #32

Under windows, the content of HasRoundTimeExpired has been put directly inside Think(), at compilation time, because of the optimization. You will need to "nop" some bytes in Think(). And again, see what I do in InfiniteRound v2 plugin.
__________________

Last edited by Arkshine; 02-10-2013 at 07:55.
Arkshine is offline
Bos93
Veteran Member
Join Date: Jul 2010
Old 02-10-2013 , 08:28   Re: Patching memory
Reply With Quote #33

Arkshine, can tell you in detail what I need to do? I looked at your plugin, I need to change the byte?

BytesToReplace (memoryIdentifierRoundTime, {0x90, 0x90, 0x90});

Where is it? memoryIdentifierRoundTime [] = "roundTimeCheck";
__________________

Last edited by Bos93; 02-10-2013 at 12:53.
Bos93 is offline
Send a message via ICQ to Bos93 Send a message via Skype™ to Bos93
Old 02-10-2013, 09:08
Bos93
This message has been deleted by Bos93.
Bos93
Veteran Member
Join Date: Jul 2010
Old 02-10-2013 , 10:20   Re: Patching memory
Reply With Quote #34

Arkshine,tell me, what should I do?

Make signature - HasRoundTimeExpired and change to nop ?
__________________
Bos93 is offline
Send a message via ICQ to Bos93 Send a message via Skype™ to Bos93
Bos93
Veteran Member
Join Date: Jul 2010
Old 02-10-2013 , 12:53   Re: Patching memory
Reply With Quote #35

server crash. What's the problem?

PHP Code:
bool createPatch()
{
    
short pattern[] = {-1,-1,-1,0x0F,0x84,0xC6,0x06,0x00,0x00,0x39,0x5D,0x74,0x0F,0x85,0xBD,0x06,0x00,0x00,0x8A,0x45,0x7E,0x84,0xC0,0x74,0x38,0x68,0xB4,0xFD,-1,-1,0x53,0xE8};
    
    
int pLength sizeof(pattern)/sizeof(short);

    
bool findet false;

    
HMODULE module;
    if(
GetModuleHandleEx(0,(LPCSTR)"mp.dll",&module))
    {
        
HANDLE process =  GetCurrentProcess();
        
_MODULEINFO moduleInfo;
        
        if(
GetModuleInformation(process,module,&moduleInfo,sizeof moduleInfo))
        {
            
            
CloseHandle(process);

            
unsigned char baseAdress =  (unsigned char *) moduleInfo.lpBaseOfDll;
            
DWORD length moduleInfo.SizeOfImage;

            
            for(
unsigned int i=0<= length pLength ;i++)
            {
                if (
comparePattern(patternbaseAdress ipLength))
                {
                    
findet true;

                    
pathAddr baseAdress i;
                }
                
            }
        }
    }
    else
    {
        
SERVER_PRINT("Error locate module mp.dll");
        return 
false;
    }

    if (!
findet)
    {
        
SERVER_PRINT("Cant find patch!");
        return 
false;
    }

    
= (void (*)(int *))pathAddr;

    
unsigned char NopBytes[3] = {0x900x900x90};

    
memcpy((void *)originalBytesNopBytessizeofNopBytes) );

    
/*pathedBytes[0] = 0xE9;
    *((long*)(&pathedBytes[1])) = (char*)checkExploit - (char*)pathAddr - 5;*/

    
DWORD oldProtection;

    if(
VirtualProtect(pathAddr5PAGE_EXECUTE_READWRITE, &oldProtection))
        return 
true;

    return 
false;

__________________
Bos93 is offline
Send a message via ICQ to Bos93 Send a message via Skype™ to Bos93
bibu
Veteran Member
Join Date: Sep 2010
Old 02-10-2013 , 13:58   Re: Patching memory
Reply With Quote #36

Is this a chat section or a forum?

Seriously, stop it.
__________________
Selling tons of my own private works.
Accepting paid work for clans and communities.
Don't hesitate to contact me.
bibu is offline
TheDS1337
Veteran Member
Join Date: Jun 2012
Old 02-11-2013 , 16:09   Re: Patching memory
Reply With Quote #37

Quote:
Originally Posted by bibu View Post
Is this a chat section or a forum?

Seriously, stop it.
Why not ? ; He is asking for help !!!!!!!
TheDS1337 is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 06:47.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode