#pragma once #include <string> int ListDirName(void); //int main11(); bool EndsWith(const std::string& str, const std::string& suffix); bool compare_pred(unsigned char a, unsigned char b); int Decode(char* fileName); int Dump(); int WriteIniFile(char* filename); int main11(char* path);
#define _CRT_SECURE_NO_WARNINGS #include <stdio.h> #include <Windows.h> #include <stdio.h> #include <io.h> #include <string> #include "标头.h" #define MAX 128 using namespace std; int Decode(const char * fileName,const char *Storage) { char* fileN = (char*)malloc(MAX); sprintf(fileN, "%s%s%s", "c:\\\\Windows\\\\dhf\\\\", fileName,".tmp"); FILE* fp = fopen(fileN,"rb"); fseek(fp, 0, SEEK_END); DWORD dwsize = ftell(fp); byte* buffer = new byte[dwsize + 1]; memset(buffer, 0, dwsize + 1); fseek(fp, 0, SEEK_SET); fread(buffer, dwsize, 1, fp); fclose(fp); int t = (int)buffer[0]; for (DWORD i = 0; i < dwsize; i++) { buffer[i] ^= t; } char* fileNa = (char*)malloc(MAX); sprintf(fileNa, "%s%s%s%s", Storage, ":\\\\", fileName,".mp4"); FILE* fp2 = fopen(fileNa, "wb"); fwrite(buffer, dwsize, 1, fp2); fclose(fp2); printf("提取成功,文件所在目录为%s盘", Storage); return EXIT_SUCCESS; } int Dump() { HMODULE hModule = NULL; FARPROC lpFunc = NULL; hModule = LoadLibrary(L"HRC5.dll"); //printf("%X\n", hModule); if (hModule) lpFunc = GetProcAddress(hModule, "StartDHFDump"); if (lpFunc != (FARPROC)NULL) (*lpFunc)(); FreeLibrary(hModule); return EXIT_SUCCESS; } int main(int argc,char **argv) { Dump(); Decode(argv[1], argv[2]); }
此源码每次只能提取一个,不能批量提取。批量提取思路(一次写入ini文件一个名字,写一个,然后提取一个,提取完,再次写入另外文件的名字,然后再次进行提取)
隐藏内容需要回复可以看见
回复
ganjuehengaoduan
楼主辛苦了,谢谢楼主,楼主好人一生平安!
感谢分享源代码。
他来了他来了,他带着牛逼走来了
支持一下,不错的哟
anjuehengaoduan
感谢分享源代码,回去研究一下