Skip to content
Snippets Groups Projects
Commit b68026ae authored by an7s's avatar an7s
Browse files

Instrumented int 0x80

Maintain value of eax 


Former-commit-id: caace7e33c709a2808eb4fba871a34c1f9f9ca0a
parent c24fca1e
No related branches found
No related tags found
No related merge requests found
......@@ -72,7 +72,7 @@ bool BuffRecv_Instrument::_add_buffered_receive_instrumentation(Instruction_t *s
callback=tmp=insertAssemblyAfter(firp,tmp,"nop");
post_callback=tmp=insertAssemblyAfter(firp,tmp,"popa");
tmp=insertAssemblyAfter(firp,tmp,"popf");
tmp=insertAssemblyAfter(firp,tmp,"mov eax, 0");
// tmp=insertAssemblyAfter(firp,tmp,"mov eax, 0");
post_callback->GetAddress()->SetVirtualOffset(postCallbackReturn);
callback->SetCallback("buffered_receive");
return true;
......@@ -92,8 +92,8 @@ bool BuffRecv_Instrument::add_buffered_receive_instrumentation()
SyscallNumber_t num=ss.GetSyscallNumber();
if(num==SNT_receive)
{
cout << "Found RECEIVE syscall - @todo: implement: " << site->getDisassembly() << " " << hex << site->GetAddress()->GetVirtualOffset() << dec << endl;
// success = success && add_buffered_receive_instrumentation(site);
cout << "Found RECEIVE syscall - instrument: " << site->getDisassembly() << " " << hex << site->GetAddress()->GetVirtualOffset() << dec << endl;
success = success && _add_buffered_receive_instrumentation(site);
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment