Da ich seit Längerem in IDA Pro und mit Python arbeite, habe ich mir nei die WingIDE Umgebung angeschaut, da sie komfortables Debugging innerhalb von IDA erlaubt.
Meine erste, ganz allgemeine Frage: gibt es ein WingIDE spezifisches Forum? Ich habe lediglich eine Mailingliste gefunden (https://wingware.com/lists/wingide), die mich aber nicht subscriben lässt ("Your subscription is not allowed because the email address you gave is insecure." - egal, welche E-Mail ich eingebe). Daher bin ich erst einmal hier gelandet.
Problem: IDA benutzt 3 Imports, die nicht in der normalen Python Umgebung bekannt sind:
Code: Alles auswählen
from idautils import *
from idc import *
from idaapi import *
gespeichert. Da ich gerne in der IDE Syntaxvervollständigungen etc hätte, habe ich also diesen Pfad unter "Project Properties" im "Python Path" angehängt ("Custom", und dann obigen Pfad inserted). Ich denke, das wäre der richtige Weg dazu, oder?/Applications/IDA Pro 6.9/idaq.app/Contents/MacOS/python/
Es funktioniert weitestgehend - wenn ich z.B. eine der oberen Modulnamen selektiere, kommt der Source Assistant korrekt, ich kann auch in die Dateien reingehen (Goto Definition). Wenn ich z.B. "By" eingebe, kommt in der Funktionsvorschau korrekterweise "Byte" (eine Funktion aus idc.py) als Vorschlag im Popup Menü. Soweit ich sagen kann, funktioniert das prima für alle Funktionen aus idc.py und idaapi.py (obschon ich nciht alle probiert habe) - aber für *keine* aus idautils.py. Hier z.B. direkt der Anfang von idautils.py (ich kann über "Goto Definition" die Datei in WingIDE anzeigen lassen):
Code: Alles auswählen
#---------------------------------------------------------------------
# IDAPython - Python plugin for Interactive Disassembler
#
# Copyright (c) 2004-2010 Gergely Erdelyi <gergely.erdelyi@d-dome.net>
#
# All rights reserved.
#
# For detailed copyright information see the file COPYING in
# the root of the distribution archive.
#---------------------------------------------------------------------
"""
idautils.py - High level utility functions for IDA
"""
import idaapi
import idc
import types
import os
def refs(ea, funcfirst, funcnext):
"""
Generic reference collector - INTERNAL USE ONLY.
"""
ref = funcfirst(ea)
while ref != idaapi.BADADDR:
yield ref
ref = funcnext(ea, ref)
def CodeRefsTo(ea, flow):
"""
Get a list of code references to 'ea'
@param ea: Target address
@param flow: Follow normal code flow or not
@type flow: Boolean (0/1, False/True)
@return: list of references (may be empty list)
Example::
for ref in CodeRefsTo(ScreenEA(), 1):
print ref
"""
if flow == 1:
return refs(ea, idaapi.get_first_cref_to, idaapi.get_next_cref_to)
else:
return refs(ea, idaapi.get_first_fcref_to, idaapi.get_next_fcref_to)
...
Ich habe alternativ auch versucht, alle Python Files des obigen Verzeichnis ins Projektverzeichnis zu kopieren, aber habe dasselbe Problem. Irgendwie werde ich nicht schlau daraus... habe ich etwas übersehen, oder ist das ein Bug?
Danke und Grüsse, Andreas