📄 struct.h
字号:
////////----------CCSPY数据类型定义----------
////////----------请求参数定义----------
const int BUSINESS_SAYHELLO = 0;
const int BUSINESS_DIR = 1;
const int BUSINESS_DOWNLOADFILE = 2;
const int BUSINESS_UPLOADFILE = 3;
const int BUSINESS_RUNFILE = 4;
const int BUSINESS_DELETEFILE = 5;
const int BUSINESS_GETPROCESS = 6;
const int BUSINESS_KILLPROCESS = 7;
const int BUSINESS_PROCESSHEAP = 8;
const int BUSINESS_SCREENCOPY = 9;
const int BUSINESS_MOUSE = 10;
const int BUSINESS_SYSTEMINFO = 11;
const int BUSINESS_REPLAYRENAME = 12;
const int BUSINESS_KEYBD = 13;
const int BUSINESS_CREATEDIRECTORY = 14;
const int MAX_BUSS = 15;
////////----------错误码定义----------
const int ERR_REQUEST_FRAME = 0x01; //请求包格式有误
const int ERR_UNKNOWN_REQUESTCMD = 0x02;//请求命令不存在
const int ERR_REQUEST_PARAMS = 0x03; //请求参数有误
const int ERR_RECEIVES = 0x04; //接收数据有误
const int ERR_DIR_NOTEXIST = 0x101; //请求目录不存在
const int ERR_DIR_EMPTY = 0x102; //请求目录为空
const int ERR_FILE_OPEN = 0x201; //打开文件出错
const int ERR_FILE_READ = 0x202; //读文件出错
const int ERR_FILE_WRITE= 0x203; //写文件出错
////////----------包头定义----------
struct _ReqPackHead
{
int nFlag;
int nSize;
int nVerson;
};
typedef struct _ReqPackHead ReqPackHead,*PReqPackHead;
struct _ReplyPackHead
{
int nFlag;
int nSize;
int nVerson;
int nErrorCode;
};
typedef struct _ReplyPackHead ReplyPackHead,*PReplyPackHead;
////////----------UDP最大包大小----------
const int MAX_UDP_PACKAGE = 1024*5;
////////----------字段常量定义------------
const int LOGINPARAMS_PASS = 21;
const int DIRPARAMS_PATH = 101;
const int DIRREPPARAMS_FILENAME = 51;
const int DFILEPARAMS_FILENAME = 101;
////////----------基本数据结构体------------
//3.2.1. say hello(00H)
struct _LoginParams
{
int nCCID; // Int 4 Id标志
char szPass[LOGINPARAMS_PASS]; // Char 21 密码
int nReserve; // Int 4 保留字段
};
typedef struct _LoginParams LoginParams,*PLoginParams;
//3.2.2. 查询中控某一个目录的所有文件列表(01H)
struct _DirParams
{
char szPath[DIRPARAMS_PATH]; // char 51 请求目录
int nReserve; // Int 4 保留字段
};
typedef struct _DirParams DirParams,*PDirParams;
//查询应答包
struct _FileAttr
{
char cFlag; // char 1 1表示文件0 表示目录
char szFileName[DIRREPPARAMS_FILENAME]; // char 51 文件/目录名称
int nSize; // int 51 文件大小
int nCreateTimeH; // Int 4 创建时间
int nCreateTimeL;
int nReserve; // Int 4 保留字段
};
typedef struct _FileAttr FileAttr,*PFileAttr;
struct _DirRepParams
{
int nCount; // int 4 当前包的文件数目
int nNextCount; // int 4 下一包的文件数目
};
typedef struct _DirRepParams DirRepParams,*PDirRepParams;
//3.2.3. 从中控下载文件(03H)
struct _DFileParams
{
char szFileName[DFILEPARAMS_FILENAME]; // char 101 文件名称(绝对路径)
int nSession; // Int 4 Session标志
int nReserve; // Int 4 保留字段
};
typedef struct _DFileParams DFileParams,*PDFileParams;
struct _DFileRepParams
{
int nSession; // Int 4 Session标志
int nSize; // Int 4 文件大小
int nPos; // int 4 文件位置
int nReserve; // Int 4 保留字段
};
typedef struct _DFileRepParams DFileRepParams,*PDFileRepParams;
//从本地上传文件
struct _DFileUp
{
char szFileName[DFILEPARAMS_FILENAME]; //char 101 文件名称(绝对路径)
int nSize; //int 4 文件大小
int nPos; //int 4 文件位置
int nReserve; //int 4 保留字段
// char Content[MAX_UDP_PACKAGE]; //char 5*1024 文件内容
};
typedef struct _DFileUp DFileUp,*PDFileUp;
//执行中控文件(0x04H)
struct _DFileRun
{
char szFileName[DFILEPARAMS_FILENAME]; //char 101 文件名称(绝对路径)
char szCmdParam[DFILEPARAMS_FILENAME]; //char 101 命令行参数 0
int nReserve; //int 4 保留字段
};
typedef struct _DFileRun DFileRun,*PDFileRun;
// 删除中控文件(0x05H)
struct _DFileDelect
{
char szFileName[DFILEPARAMS_FILENAME]; //char 101 文件名称(绝对路径)
int nReserve; //int 4 保留字段
};
typedef struct _DFileDelect DFileDelect,*PDFileDelect;
// 3.2.7. 获得进程列表(0x06H)
struct _DProcessAttr
{
char szProcessName[DIRREPPARAMS_FILENAME]; // char 51 进程名称
UINT nProcessID; // int 4 进程标志ID
int nCntThreads; // Int 4 线程数
UINT nTh32MemoryBase; // Int 4 基地址
int nReserve; //int 4 保留字段
};
typedef struct _DProcessAttr DProcessAttr,*PDProcessAttr;
struct _DirRepProcess
{
int nCount; // int 4 当前包的文件数目
int nNextCount; // int 4 下一包的文件数目
};
typedef struct _DirRepProcess DirRepProcess,*PDirRepProcess;
//3.2.8. 杀死某进程(0x07H)
struct _DKillProcess
{
int nProcessID; // int 4 进程标志ID
int nReserve; // int 4 保留字段
};
typedef struct _DKillProcess DKillProcess,*PDKillProcess;
//3.2.9. 获得某进程的堆使用情况(0x08H)
struct _DProcessHeap
{
char szProcessName[51]; // char 51 进程名称
int nProcessID; // int 4 进程ID
int nReserve; // int 4 保留字段
};
typedef struct _DProcessHeap DProcessHeap,*pDProcessHeap;
struct _DRepProcessHeap
{
int nCount; // int 4 当前包的文件数目
int nNextCount; // int 4 下一包的文件数目
};
typedef struct _DRepProcessHeap DRepProcessHeap,*pDRepProcessHeap;
struct _DProcessHeapInfo
{
int nth32HeapID; // int 4 堆标志ID
int nFlags; // int 4 标志
int nAddress; // int 4 基地址
int nBlockSize; // int 4 大小
int nReserve; // int 4 保留字段
};
typedef struct _DProcessHeapInfo DProcessHeapInfo,*pDProcessHeapInfo;
typedef struct _MDataList
{
int size;
char data[1024];
_MDataList *next;
}MDataList,*pMDataList;
typedef struct _MDataList2
{
int size;
char* data;
_MDataList2 *next;
}MDataList2,*pMDataList2;
//3.2.10. 屏幕copy(0x09H)
struct _DScCpyParams
{
int nSession; // Int 4 Session标志
int nReserve; // Int 4 保留字段
};
typedef struct _DScCpyParams DScCpyParams,*PDScCpyParams;
struct _DScCpyRepParams
{
int nSession; // Int 4 Session标志
int nSize; // Int 4 文件大小
int nPos; // int 4 文件位置
int nReserve; // Int 4 保留字段
// char Content[5*1024]; // BMP内容
};
typedef struct _DScCpyRepParams DScCpyRepParams,*PDScCpyRepParams;
// 3.2.11. 鼠标模拟(0x0ah)
struct _DMouseParams
{
int ButtonType; //int 4 按键类型1 表示单击左键2 表示单击右键3 表示双击左键
int PointX; //Int 4
int PointY; //Int 4
int Reserve; //Int 4 保留字段
};
//3.2.12. 获得系统信息(0x0BH)
struct _DSystemInfo
{
int SysType; // Int 4 0 所有信息
int Reserve; // Int 4 保留字段
};
typedef struct _DSystemInfo DSystemInfo,*PDSystemInfo;
//3.2.13. 修改中控文件名称(0x0CH)
struct _DReplyReName
{
char szFileName[DFILEPARAMS_FILENAME]; // char 101 文件名称(绝对路径)
char szNewFileName[DFILEPARAMS_FILENAME]; // char 101 修改后的文件名称(绝对路径)
int Reserve; // Int 4 保留字段
};
typedef struct _DReplyReName DReplyReName,*PDReplyReName;
// 3.2.14. 模拟按键消息(0x0DH)
typedef struct _DMouseParams DMouseParams,*pDMouseParams;
struct _DKeybdParams
{
char Vk; // UINT 1 virtual-key code
char Scan; // UINT 1 hardware scan code
int Flags; // Int 4 flags specifying various function options
int Reserve; // Int 4 保留字段
};
typedef struct _DKeybdParams DKeybdParams,*PDKyebdParams;
struct _DCreateDirectory
{
char FolderPath[101]; // 文件夹路径(绝对路径)
int Reserve; // Int 4 保留字段
};
typedef struct _DCreateDirectory DCreateDirectory,*PDCreateDirectory;
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -