(-: Fibergeek's Blog :-)
Inhoud blog
  • Python 2 of 3
  • IDA-python: GetStructureIdAt
  • Geslaagd in Microsoft's 70-680 examen
  • minibio: kort vervolg
  • miniboa: een voorbeeld
    Zoeken in blog

    Categorieën
  • Code: C/C++ (2)
  • Code: Powershell (1)
  • Code: Python (8)
  • Code: WPF (2)
  • Programmeren (5)
  • 09-11-2012
    Klik hier om een link te hebben waarmee u dit artikel later terug kunt lezen.IDA-python: GetStructureIdAt

    De onderstaande snippet is de omgedraaide versie van MakeStruct:

    def GetStructureIdAt(ea):
     flags = idaapi.getFlags(ea)
     if isStruct(flags):
      ti = idaapi.opinfo_t()
      idaapi.get_opinfo(ea, 0, flags, ti), "get_opinfo() failed"
      return ti.tid
     return BADADDR

    tid = GetStructureIdAt(ScreenEA())
    print GetStrucName(tid)
    NOTA: de onderstaande versie is compatibel met oudere versies van IDA-python:
    def GetStructureIdAt(ea):
      flags = idaapi.getFlags(ea)
      if isStruct(flags):
        try:
          ti = idaapi.typeinfo_t()
          assert idaapi.get_typeinfo(ea, 0, flags, ti), "get_typeinfo() failed"
        except AttributeError:
          ti = idaapi.opinfo_t()
          assert idaapi.get_opinfo(ea, 0, flags, ti), "get_opinfo() failed"
        return ti.tid
      return BADADDR

    09-11-2012, 00:00 Geschreven door Fibergeek  


    Categorie:Code: Python
    Tags:IDAPython
    Archief per week
  • 25/11-01/12 2013
  • 05/11-11/11 2012
  • 07/05-13/05 2012
  • 05/03-11/03 2012
  • 20/02-26/02 2012
  • 13/02-19/02 2012
  • 30/01-05/02 2012
  • 12/12-18/12 2011
  • 05/12-11/12 2011
  • 19/09-25/09 2011
  • 15/08-21/08 2011
  • 01/08-07/08 2011
  • 04/07-10/07 2011
  • 06/06-12/06 2011

    E-mail mij

    Druk op onderstaande knop om mij te e-mailen.


    Gastenboek

    Druk op onderstaande knop om een berichtje achter te laten in mijn gastenboek


    Blog als favoriet !


    Blog tegen de wet? Klik hier.
    Gratis blog op https://www.bloggen.be - Meer blogs