예제 #1
0
// patches file's PE header to make it compatible with WinXP
void patchHeader(LPCSTR filename)
{
	PeLib::PeFile* pef = PeLib::openPeFile(filename);
	pef->readMzHeader();
	pef->readPeHeader();

	PatchPeHeaderVisitor vis;
	pef->visit(vis);

	delete pef;
}
예제 #2
0
파일: main.cpp 프로젝트: pulsar-git/YoPu
void pack_pe(char * name)
{
    std::string filename = name;
    PeLib::PeFile* pef = PeLib::openPeFile(filename);
	
	if (!pef)
	{
		std::cout << "Invalid PE File" << std::endl;
		return ;
	}

	pef->readMzHeader();
	pef->readPeHeader();


	dump(centerOutput("----------------------------------------------"));
	dump(centerOutput("PE Loaded"));
	dump(centerOutput("----------------------------------------------"));
	
	PeRebuilderVisitor  v2;
	pef->visit(v2);
	
	delete pef;     
}