摘要: ``` include include using namespace std; BOOL IterAtorFileSaveFile(IN LPWSTR pFindPath, OUT vector& vSaveFile)//遍历文件,并且保存文件到vector容器当中. { HANDLE hFind 阅读全文
posted @ 2019-04-22 14:15 iBinary 阅读(466) 评论(0) 推荐(0)
摘要: ``` #include #include #include #include using namespace std; BOOL GetEachLevelDir(PWSTR GetPathName, vector &wSavePath,DWORD PathLen) //传入一个路径,获取每一级的目录.并且用数组进行存储. { TCHAR *pCurPoint = GetPathName... 阅读全文
posted @ 2019-04-22 14:01 iBinary 阅读(555) 评论(0) 推荐(0)
摘要: ``` BOOL SplitPathName( PWSTR MyXbpathBuffer, wstring& wdrive, wstring& wdir, wstring& wfname, wstring& wext)//分割路径PWSTR MyXbpathBuffer { TCHAR drive[_MAX_DRIVE]; TCHAR dir[_MAX_DIR]; TCHAR f... 阅读全文
posted @ 2019-04-22 14:00 iBinary 阅读(476) 评论(0) 推荐(0)
摘要: ``` BOOL GetLnkFileName( OUT PWSTR pLnkName, OUT PWSTR OepnFileNameBuufer, IN DWORD OpenFileNameBufferSize) //传入快捷方式,返回快捷方式指向的文件名 { CoInitialize(0); BOOL bRet = FALSE; //返回值判断. IShellLinkW* shli... 阅读全文
posted @ 2019-04-22 13:50 iBinary 阅读(1930) 评论(0) 推荐(0)
摘要: / 1.修改文件头节个数 +1 2.修改ImageBase 3.遍历节表,拷贝最后一个节表到下面 4.修改节的虚拟大小(节表.virtualSize) 5.修改节的虚拟地址(RVA 节表.virtualAddress) 内存对齐( 上一个节表.virtualAddress + 上一个节表.virtu 阅读全文
posted @ 2019-04-22 11:53 iBinary 阅读(660) 评论(0) 推荐(0)
摘要: #include <windows.h> bool AdjustPrivileges() { HANDLE hToken = NULL; TOKEN_PRIVILEGES tp; TOKEN_PRIVILEGES oldtp; DWORD dwSize = sizeof(TOKEN_PRIVILEG 阅读全文
posted @ 2019-04-22 11:49 iBinary 阅读(1321) 评论(2) 推荐(0)
摘要: ``` DWORD GetKerner32ImageBase() { DWORD nIMageBase = 0; __asm { xor edx,edx mov ecx, fs:[0x30]; mov ecx, [ecx + 0x0C]; mov ecx, [ecx + 0x1C]; loc_57901D: mov eax, ... 阅读全文
posted @ 2019-04-22 11:48 iBinary 阅读(435) 评论(0) 推荐(0)
摘要: ``` #include #include #include #include #include #include #pragma comment (lib,"Psapi.lib") BOOL DosPathToNtPath(LPTSTR pszDosPath, LPTSTR pszNtPath) { TCHAR szDriveStr[500]; ... 阅读全文
posted @ 2019-04-22 11:43 iBinary 阅读(1754) 评论(0) 推荐(0)