util.h
资源名称:HookAPI [点击查看]
上传用户:nbcables
上传日期:2007-01-11
资源大小:1243k
文件大小:1k
源码类别:
钩子与API截获
开发平台:
Visual C++
- #ifndef __UTIL_H__
- #define __UTIL_H__
- #include <winsock.h>
- typedef struct
- {
- char app_name[128];
- char *p_password;
- }PASSWORD_DATA;
- int ipcmp(char *szip1, char *szip2);
- ULONG GetIntIP(char *szip);
- ULONG my_atoi(char *p);
- void GetFileName(char *fname);
- void WriteLog(char *fmt,...);
- int GetPassword(char *, char *);
- int FindData(unsigned char *, int , unsigned char *, int, int);
- char *upper_case(char *p, int len);
- int mreplace(char *buf, int len, char *str, char c);
- int EncryptData(int algrithm, char *password, unsigned char *inbuf, int inbuf_len, unsigned char *outbuf, int *outbuf_len);
- int DecryptData(int algrithm, char *password, unsigned char *inbuf, int inbuf_len, unsigned char *outbuf, int *outbuf_len);
- int GetProcessBaseName(HANDLE hProcess, char *name);
- char * GetErrString(char *str, DWORD errcode);
- int split_cmd(char *cmd, char *app, char *file);
- int MyDecryptFile(char *src_file, char *dst_file, char *password);
- char *GetFileNameByHandle(HANDLE hFile, char *name);
- #endif