x64dbg / x64dbgpy

Automating x64dbg using Python, Snapshots:
https://ci.appveyor.com/project/mrexodia/x64dbg-python/build/artifacts
MIT License
1.47k stars 70 forks source link

how to access all element of array in another struct? #33

Open UndefinedIdentifier opened 5 years ago

UndefinedIdentifier commented 5 years ago

I have a script which get instruction place on EIP

ins = pluginsdk.x64dbg.DISASM_INSTR()
pluginsdk.x64dbg.DbgDisasmAt(Register.EIP, ins)

ins has an array field name arg,and arg has 3 element. I can only access first element of arg. there is no idea how to aceess other element of arg

typedef struct { DISASM_ARGTYPE type; //normal/memory SEGMENTREG segment; char mnemonic[64]; duint constant; //constant in the instruction (imm/disp) duint value; //equal to constant or equal to the register value duint memvalue; //memsize:[value] } DISASM_ARG;

typedef struct { char instruction[64]; DISASM_INSTRTYPE type; int argcount; int instr_size; DISASM_ARG arg[3]; } DISASM_INSTR;