fix up
This commit is contained in:
@@ -32,9 +32,8 @@ auto getPeInfo(std::string inputFilePath) -> std::shared_ptr<BasicPeInfo> {
|
||||
return sampleInfo;
|
||||
}
|
||||
int main() {
|
||||
// auto sampleInfo =
|
||||
// getPeInfo("E:\\对战平台\\CrowAntiCheat\\CrowAntiCheat\\client\\Console_Test\\x64\\Release\\Console_Test.exe");
|
||||
auto sampleInfo = getPeInfo("C:\\ConsoleApplication1.exe");
|
||||
auto sampleInfo = getPeInfo("z:\\Console_Test.exe");
|
||||
// auto sampleInfo = getPeInfo("C:\\ConsoleApplication1.exe");
|
||||
printf("input new file %s \n", sampleInfo->inputFilePath);
|
||||
printf("is x64: %d\n", sampleInfo->isX64);
|
||||
printf("is relocated: %d\n", sampleInfo->isRelocated);
|
||||
@@ -42,6 +41,14 @@ int main() {
|
||||
auto sandbox = std::make_shared<Sandbox>();
|
||||
sandbox->InitEnv(sampleInfo);
|
||||
sandbox->Run();
|
||||
auto [peBuffer, peSize] = sandbox->DumpPE();
|
||||
|
||||
if (peBuffer) {
|
||||
printf("peBuffer: %p\n", peBuffer.get());
|
||||
printf("peSize: %d\n", peSize);
|
||||
peconv::dump_to_file("z:\\dumped_main.exe", peBuffer.get(), peSize);
|
||||
}
|
||||
peBuffer.release();
|
||||
system("pause");
|
||||
return 0;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user