CE自行更改后修改器源码分享


修改之后的CE可以获取进程,并对文件进行加密保存。层改了后缀
资源截图
代码片段和文件信息
/*
 * api.c
 *
 *  Created on: Jul 20 2011
 *      Author: erich
 *
 *      This unit will implement the api‘s CE uses
 *      This will be the main point of interest when porting to another system
 */

//#define _XOPEN_SOURCE 500

//todo for in the far future: Hook syscalls

#define _FILE_OFFSET_BITS 64
#define _LARGEFILE64_SOURCE

#include 
#include 

#include 


#include 
#include 
#include 

#include 
#include 
#include 
#include 
#include 
#include 
#include 
#include 

#include 

#include 
#include 
#include 
#include 
#include 

#ifndef __x86_64__
#include 
#endif


#include 

#include 

#include 
#include 
#include 

#include 

#ifndef __x86_64__
#include 
#include 
#endif


#ifdef __arm__
#include 

#endif

//blatantly stolen from the kernel source
#define PTRACE_GETHBPREGS 29
#define PTRACE_SETHBPREGS 30

/* Breakpoint */
#define ARM_BREAKPOINT_EXECUTE  0

/* Watchpoints */
#define ARM_BREAKPOINT_LOAD     1
#define ARM_BREAKPOINT_STORE    2

/* Privilege Levels */
#define ARM_BREAKPOINT_PRIV     1
#define ARM_BREAKPOINT_USER     2

/* Lengths */
#define ARM_BREAKPOINT_LEN_1    0x1
#define ARM_BREAKPOINT_LEN_2    0x3
#define ARM_BREAKPOINT_LEN_4    0xf
#define ARM_BREAKPOINT_LEN_8    0xff

static inline unsigned int encode_ctrl_reg(int mismatch int len int type int privilege int enabled)
{
        return (mismatch << 22) | (len << 5) | (type << 3) | (privilege << 1) | enabled;
}

#ifndef __ANDROID__
  #if defined(__i386__) || defined(__x86_64__)
    #include 
  #endif
#endif



#include “api.h“
#include “porthelp.h“
#include “ceserver.h“
#include “threads.h“
#include “symbols.h“
#include “context.h“

//#include 
sem_t sem_DebugThreadEvent;

pthread_mutex_t memorymutex;
pthread_mutex_t debugsocketmutex;
//pthread_mutex_t mut_RPM;

typedef struct
{
  int ReferenceCount;
  int processListIterator;
  int processCount;
  PProcessListEntry processList;
} ProcessList *PProcessList;

typedef struct
{
  int ReferenceCount;
  int moduleListIterator;
  int moduleCount;
  PModuleListEntry moduleList;
} ModuleList *PModuleList;

int VerboseLevel=0;


int WakeDebuggerThread()
{

  sem_post(&sem_DebugThreadEvent);
}

void mychildhandler(int signal struct siginfo *info void *context)
{
  //only call re-entrant functions

  int orig_errno = errno;
  WakeDebuggerThread();
  errno = orig_errno;


}

int GetDebugPort(HANDLE hProcess)
//return the debugserver fd
{
  if (GetHandleType(hProcess) == htProcesHandle )
  {
    PProcessData p=(PProcessData)GetPointerFromHandle(hProcess);
    if (p->isDebugged)
    {
      return p->debuggerServer;
    }
  }

  return -1;

}

int FindPaused

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----
     目录           0  2018-06-23 02:38  cheat-engine-6.8.1
     文件          55  2018-06-23 02:38  cheat-engine-6.8.1.gitignore
     目录           0  2019-03-15 15:56  cheat-engine-6.8.1Cheat Engine
     文件          51  2018-06-23 02:38  cheat-engine-6.8.1Cheat Engineaboutunit.ddp
     文件        6641  2019-03-15 15:54  cheat-engine-6.8.1Cheat Engineaboutunit.lfm
     文件         663  2019-03-15 15:54  cheat-engine-6.8.1Cheat Engineaboutunit.lrt
     文件        6509  2019-03-15 15:54  cheat-engine-6.8.1Cheat Engineaboutunit.pas
     文件        1511  2018-06-23 02:38  cheat-engine-6.8.1Cheat EngineAccessCheck.pas
     文件        6565  2018-06-23 02:38  cheat-engine-6.8.1Cheat Engineaccessedmemory.lfm
     文件        1122  2018-06-23 02:38  cheat-engine-6.8.1Cheat Engineaccessedmemory.lrt
     文件        6011  2018-06-23 02:38  cheat-engine-6.8.1Cheat Engineaccessedmemory.pas
     文件          51  2018-06-23 02:38  cheat-engine-6.8.1Cheat EngineAddAddress.ddp
     文件         762  2018-06-23 02:38  cheat-engine-6.8.1Cheat EngineAddAddress.lrt
     文件        1266  2018-06-23 02:38  cheat-engine-6.8.1Cheat Engineaddressedit.pas
     文件       67562  2018-06-23 02:38  cheat-engine-6.8.1Cheat Engineaddresslist.pas
     文件        4890  2018-06-23 02:38  cheat-engine-6.8.1Cheat Engineaddresslisteditor.pas
     文件        3350  2018-06-23 02:38  cheat-engine-6.8.1Cheat Engineaddresslisthandlerunit.pas
     文件        9068  2018-06-23 02:38  cheat-engine-6.8.1Cheat Engineaddressparser.pas
     文件          51  2018-06-23 02:38  cheat-engine-6.8.1Cheat EngineAdvancedOptionsUnit.ddp
     文件        8407  2018-06-23 02:38  cheat-engine-6.8.1Cheat EngineAdvancedOptionsUnit.lfm
     文件        1076  2018-06-23 02:38  cheat-engine-6.8.1Cheat EngineAdvancedOptionsUnit.lrt
     文件       25071  2018-06-23 02:38  cheat-engine-6.8.1Cheat EngineAdvancedOptionsUnit.pas
     目录           0  2018-06-23 02:38  cheat-engine-6.8.1Cheat Engineallochook
     文件        1201  2018-06-23 02:38  cheat-engine-6.8.1Cheat Engineallochookallochook.dpr
     文件        7772  2018-06-23 02:38  cheat-engine-6.8.1Cheat Engineallochookallochook.lpi
     文件         590  2018-06-23 02:38  cheat-engine-6.8.1Cheat Engineallochookallochook.lpr
     文件        9873  2018-06-23 02:38  cheat-engine-6.8.1Cheat Engineallochookhookedfunctions.pas
     文件        4288  2018-06-23 02:38  cheat-engine-6.8.1Cheat EngineAPIhooktemplatesettingsfrm.lfm
     文件         575  2018-06-23 02:38  cheat-engine-6.8.1Cheat EngineAPIhooktemplatesettingsfrm.lrt
     文件        1152  2018-06-23 02:38  cheat-engine-6.8.1Cheat EngineAPIhooktemplatesettingsfrm.pas
     文件       15438  2018-06-23 02:38  cheat-engine-6.8.1Cheat Engineasktorunluascript.lfm
............此处省略3735个文件信息

版权声明:本文内容由互联网用户自发贡献,该文观点仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容, 请发送邮件举报,一经查实,本站将立刻删除。

发表评论

评论列表(条)