分亨某游戏外挂,吃红,吃蓝,自动打怪源码

 

C/C++ code

 
HWND hwnd= ::FindWindow(NULL,"YB_OnlineClient"); if(hwnd==NULL) { ::AfxMessageBox("获取窗口句柄失败"); return; } DWORD pid=0; ::GetWindowThreadProcessId(hwnd,&pid); CString cs; OpenProcessPrivate(pid,cs); HANDLE hpid=OpenProcess(PROCESS_CREATE_THREAD| //允许远程创建线程 PROCESS_VM_OPERATION | //VM操作 PROCESS_VM_READ| PROCESS_VM_WRITE,FALSE,pid); if(hpid==NULL) { DWORD errid=::GetLastError(); LPSTR lpBuffer; FormatMessage ( FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_IGNORE_INSERTS | FORMAT_MESSAGE_FROM_SYSTEM, NULL, errid, // 此乃错误代码,通常在程序中可由 GetLastError()得之 LANG_NEUTRAL, (LPTSTR) & lpBuffer, 0 , NULL ); CString strErrorCause = lpBuffer ? _T(lpBuffer) : _T( " Sorry, cannot find this error info. " ); this->SetWindowTextA(strErrorCause); } LPVOID paddress=::VirtualAllocEx(hpid,NULL,0x3000,MEM_COMMIT|MEM_RESERVE,PAGE_EXECUTE_READWRITE); BOOL iReturnCode=WriteProcessMemory (hpid,paddress,AddBloog,0x3000,NULL); if (!iReturnCode) { //::AfxMessageBox("写入内存失败"); } else { //::AfxMessageBox("写入内存成功"); DWORD tid=0; HANDLE htid=CreateRemoteThread(hpid,NULL,0,(LPTHREAD_START_ROUTINE )paddress,0,0,&tid); if(htid==NULL) { ::CloseHandle(htid); DWORD errid=::GetLastError(); LPSTR lpBuffer; FormatMessage ( FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_IGNORE_INSERTS | FORMAT_MESSAGE_FROM_SYSTEM, NULL, errid, // 此乃错误代码,通常在程序中可由 GetLastError()得之 LANG_NEUTRAL, (LPTSTR) & lpBuffer, 0 , NULL ); CString strErrorCause = lpBuffer ? _T(lpBuffer) : _T( " Sorry, cannot find this error info. " ); this->SetWindowTextA(strErrorCause); } } VirtualFreeEx(hpid,paddress,0x3000,MEM_RELEASE);

 

打怪的源码

C/C++ code

void CRMainDialog::EMon(void)
{
    UpdateData(false);
    
    int *p;
    int max=MONLISTBASE+0xffff*4;
    float *pt;
    int *p2e;
    int *p380;
    int md=-1;
    float ptt=-1;
    for(int i=MONLISTBASE;i<max;i+=4)
    {
        p=(int *)i;
        p2e=(int *)(*p+8);
        if(*p2e==0x2e)
        {
            pt=(float *)(*p+0x31);
            if (*pt<this->m_mon_dis)
            {
                p380=(int *)(*p+0x18);
                if(*p380==0)
                {   
                    if(ptt<0)
                    {
                        ptt=*pt;
                        int *monid=(int *)(*p+0xc);
                        md=*monid;
                        //::AfxMessageBox("if(ptt<-1)");
                    }
                    else
                    { 
                        if(ptt>*pt)
                        {
                            ptt=*pt;
                            int *monid=(int *)(*p+0xc);
                            md=*monid;
                            //::AfxMessageBox("if(ptt>*pt)");
                        }
                    }
                }
            }
        }
    }

    
    int *pbasese=(int *)(CURRENTMON);
    int base=*pbasese;
    int* psel;
    psel=(int *)(base+0x1cb0);
    *psel=md;
}
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值