Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
nblog committed Nov 7, 2022
1 parent 72873cc commit 18863ff
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 11 deletions.
12 changes: 11 additions & 1 deletion x64dbgpy3/x64dbgpyt3.py
Original file line number Diff line number Diff line change
Expand Up @@ -122,10 +122,20 @@ def Assemble(addr:ptr_t, instruction:str):
res = X64DBGREQ.req_call( FUNCTION_NAME(dbgAssembler), [ addr, instruction ] )
return bool( res )

class DBGDISASMINFO(DBGNS):
class INSTRUCTIONTYPE:
VALUE, MEMORY, ADDRESS = 1, 2, 4
type:INSTRUCTIONTYPE
addr:ptr_t
branch:bool
call:bool
size:int
instruction:str

@staticmethod
def DisasmFast(addr:ptr_t):
raise NotImplementedError
res = X64DBGREQ.req_call( FUNCTION_NAME(dbgAssembler), [ addr ] )
return dbgAssembler.DBGDISASMINFO(**res)


class dbgSymbol:
Expand Down
11 changes: 1 addition & 10 deletions x64dbgpy3svr/x64dbghandler.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -44,18 +44,13 @@ namespace x64dbgSvrWrapper {
/* BASIC_INSTRUCTION_INFO */
struct INSTRUCTION_INFO_WRAPPER {
uint32_t type;
/* MEMORY_INFO */
ptr_t mem_value;
int32_t mem_size;
std::string mem_mnemonic;

ptr_t addr;
bool branch, call;
int size;
std::string instruction;
};
NLOHMANN_DEFINE_TYPE_NON_INTRUSIVE(INSTRUCTION_INFO_WRAPPER, \
type, mem_value, mem_size, mem_mnemonic, addr, branch, call, size, instruction)
type, addr, branch, call, size, instruction)

/* BRIDGEBP */
struct BREAKPOINT_INFO_WRAPPER {
Expand Down Expand Up @@ -278,10 +273,6 @@ namespace x64dbgSvrWrapper {

disasm = dbgNS::INSTRUCTION_INFO_WRAPPER{
info.type,
/* MEMORY_INFO */
info.memory.value,
info.memory.size,
info.memory.mnemonic,
info.addr,
info.branch, info.call,
info.size,
Expand Down

0 comments on commit 18863ff

Please sign in to comment.