Want to Join Us ?

you'll be able to discuss, share and send private messages.

Release Setting up Ida with Pyside and PyQt, it makes big difference.

Discussion in 'Plugins' started by storm shadow, Feb 20, 2013.

Share This Page

  1. storm shadow

    Techbliss Owner Admin Ida Pro Expert Developer

    I build version 1.5.2 with x64

    --------------------------------------------------------------------------------------
    Python 2.7.6 (default, Nov 10 2013, 19:24:18) [MSC v.1500 32 bit (Intel)]
    IDAPython v1.5.2 final (serial 3) (c) The IDAPython Team <idapython@googlegroups.com>
    --------------------------------------------------------------------------------------

    See if we can build some off the others

    https://anonfiles.com/file/b0d695f20c5eb6935a12dd46a1c8ba0f
    idasdk65 ifound :oops:
     

    Attached Files:

    Rip Cord likes this.
  2. storm shadow

    Techbliss Owner Admin Ida Pro Expert Developer

  3. storm shadow

    Techbliss Owner Admin Ida Pro Expert Developer

    its pretty wierd that the version 362 dont build
    only change is
    idc.py
     
  4. storm shadow

    Techbliss Owner Admin Ida Pro Expert Developer

    ;)
    i can build without editing anything up to revision 364

    this was replacing some files
    --------------------------------------------------------------------------------------
    Python 2.7.6 (default, Nov 10 2013, 19:24:18) [MSC v.1500 32 bit (Intel)]
    IDAPython v1.5.3 final (serial 3) (c) The IDAPython Team <idapython@googlegroups.com>
    --------------------------------------------------------------------------------------

    build.py is they key to make a succesfull build
     
  5. storm shadow

    Techbliss Owner Admin Ida Pro Expert Developer

    here
    You have to use idc.py from 1.5.2 version
    els its gonna crash
     

    Attached Files:

    Rip Cord likes this.
  6. storm shadow

    Techbliss Owner Admin Ida Pro Expert Developer

    not the big differense from version 1.5.2 to 1.5.3.
    I wonder why i cant build the versions 1.5.4>>>1.5.6 even with the right sdk
     
  7. computerline

    Well-Known Member Ida Pro Expert

    I think because idapython only the wraper of IDA API, so, though you build with latest revision of idapython, you still miss some function
     
  8. storm shadow

    Techbliss Owner Admin Ida Pro Expert Developer

    i messed up my local account
    My admin acount have some trouble with PyQt

    When trying the ida\exampels\ex_pyqt.py

    Code (Text):
    DLL load failed: Den angivne procedure blev ikke fundet.
    Traceback (most recent call last):
      File "C:\Users\**\Downloads\ida\ida\python\idaapi.py", line 400, in IDAPython_ExecScript
        execfile(script, g)
      File "C:/Users/**/Downloads/ida/ida/examples/ex_pyqt.py", line 2, in <module>
        from PyQt4 import QtCore, QtGui
    ImportError: DLL load failed: not found.
    in CMD.exe all good

    Code (Text):
    >>> help ("PyQt4.QtCore")
    Help on module PyQt4.QtCore in PyQt4:
     
    NAME
        PyQt4.QtCore
     
    FILE
        c:\python27\lib\site-packages\pyqt4\qtcore.pyd
     
    CLASSES
        __builtin__.int(__builtin__.object)
            QtMsgType
        __builtin__.object
            pyqtBoundSignal
            pyqtProperty
            pyqtSignal
        sip.simplewrapper(__builtin__.object)
    But in ida python gui

    it finds PyQt

    Code (Text):
    Python>help ("PyQt4")
    Help on package PyQt4:
     
    NAME
        PyQt4
     
    FILE
        c:\python27\lib\site-packages\pyqt4\__init__.py
    PACKAGE CONTENTS
    QAxContainer
    Qsci
    Qt
    QtCore
    QtDeclarative
    QtDesigner
    QtGui
    QtHelp
    QtMultimedia
    QtNetwork
    QtOpenGL
    QtScript
    QtScriptTools
    QtSql
    QtSvg
    QtTest
    QtWebKit
    QtXml
    QtXmlPatterns
    phonon
    uic (package)
     
     
    But not PyQt4.QtCore

    Code (Text):
    Python>help ("PyQt4.QtCore")
    no Python documentation found for 'PyQt4.QtCore'
    All is in the same path and wird thing is
    that it says c:\python27\lib\site-packages\pyqt4\ dosent exist
    But the folder name is c:\python27\lib\site-packages\PyQt4\

    Not sure what happend i reinstalled all any ideas

    If i use the QtCore.Pyd from PySide it finds it,so it must be some sort off error with the dll in PyQt4

    Maybe someone can upload there folder PyQt4 from Python
     
  9. computerline

    Well-Known Member Ida Pro Expert

    PyQt will not work if you not compile it with QT namespace, we need patch it same as PySide, and rebuild, but we can modify file for work with PySide :D
     
    storm shadow likes this.
  10. storm shadow

    Techbliss Owner Admin Ida Pro Expert Developer

    the python PyQt dosent have the option to build
    Code (Text):
    configure -debug-and-release -platform win32-msvc2008 -no-qt3support -qtnamespace QT
    i dowloaded the windows QT build with code

    Code (Text):
    C:\Qt\4.8.5>configure -opensource -confirm-license -release -platform win32-msvc
    2010 -no-qt3support-qtnamespace QT
    after 3 hours off building

    Code (Text):
    Generating Code...
    NMAKE : fatal error U1077: '"c:\Program Files (x86)\Microsoft Visual Studio 10.0
    \VC\BIN\cl.EXE"' : return code '0x2'
    Stop.
    NMAKE : fatal error U1077: '"c:\Program Files (x86)\Microsoft Visual Studio 10.0
    \VC\BIN\nmake.exe"' : return code '0x2'
    Stop.
    NMAKE : fatal error U1077: 'cd' : return code '0x2'
    Stop.
    NMAKE : fatal error U1077: 'cd' : return code '0x2'
    Stop.
    NMAKE : fatal error U1077: 'cd' : return code '0x2'
    Stop.
    :(
     
  11. computerline

    Well-Known Member Ida Pro Expert

  12. storm shadow

    Techbliss Owner Admin Ida Pro Expert Developer

    yeah i used that guide gives back the error

    it chrashed after 3 hours off nmake


    Code (Text):
    Generating Code...
    NMAKE : fatal error U1077: '"c:\Program Files (x86)\Microsoft Visual Studio 10.0
    \VC\BIN\cl.EXE"' : return code '0x2'
    Stop.
    NMAKE : fatal error U1077: '"c:\Program Files (x86)\Microsoft Visual Studio 10.0
    \VC\BIN\nmake.exe"' : return code '0x2'
    Stop.
    NMAKE : fatal error U1077: 'cd' : return code '0x2'
    Stop.
    NMAKE : fatal error U1077: 'cd' : return code '0x2'
    Stop.
    NMAKE : fatal error U1077: 'cd' : return code '0x2'
    Stop.
    isent there any release that have been build allready
     
  13. computerline

    Well-Known Member Ida Pro Expert

    I haved build version 4.8.5, but it too large to upload. This is my build of PyQt4 support 4 IDA 6.1
    Code (Text):
    https://mega.co.nz/#F!IN0TCAKD!dGZdKOL1OiNVjeDqz4GzvA
     
    storm shadow likes this.
  14. storm shadow

    Techbliss Owner Admin Ida Pro Expert Developer

    thx im trying to rebuild it using ..\jom\jom.exe -j 4 it crashes again im gonna use your build.
    if it succed would i need to patch it like PySide ?
    they dont say on http://www.hexblog.com/?p=250

    :D
     
  15. computerline

    Well-Known Member Ida Pro Expert

    You need :
    1. Build Qt with QT_NAMESPACE support
    2. Build SIP with QT_NAMESPACE
    Code (Text):
    configure.py DEFINES+=QT_NAMESPACE=x
    3. Edit sipconfig.py
    Code (Text):
    sipconfig.py
                defines.append("QT_THREAD_SUPPORT")
                # Add here    <-------
                defines.append("QT_NAMESPACE=QT")
                # Handle library directories.
                libdir_qt = self.optional_list("LIBDIR_QT")
                libdir.extend(libdir_qt)
                rpaths.extend(libdir_qt)
     
                if qt_version >= 0x040000:
    4. Build PyQt
    Code (Text):
    configure.py -w
     
    storm shadow likes this.
  16. storm shadow

    Techbliss Owner Admin Ida Pro Expert Developer

    Then i have some fun compiling the rest off the day :p
     
    computerline likes this.
  17. storm shadow

    Techbliss Owner Admin Ida Pro Expert Developer

    after nmake where is it located o_O
     
  18. computerline

    Well-Known Member Ida Pro Expert

    It make each folder QtGui, QtCore, ... etc, in this you will find *.pyd file
     
    storm shadow likes this.
  19. storm shadow

    Techbliss Owner Admin Ida Pro Expert Developer

    went all good

    I was playing around with the idapython again

    i managed to build with ida revision 365 with sdk 6.2

    then i replaced the ida.lib(ida.WLL) and pro lib from ida sdk 6.1

    no wonder it didnt build, but i got the reason why it cant build.
    Code (Text):
    link /nologo /dll /export:PLUGIN /out:python.plw idaapi.obj python.obj /LIBPATH:
    C:\Python27\libs /LIBPATH:C:\idasdk61\lib\x86_win_vc_32 python27.lib ida.lib
      Creating library python.lib and object python.exp
    idaapi.obj : error LNK2019: unresolved external symbol _qvector_reserve@16 refer
    enced in function __wrap_qvector_reserve
    python.obj : error LNK2001: unresolved external symbol _qvector_reserve@16
    idaapi.obj : error LNK2019: unresolved external symbol _op_adds_xrefs@8 referenc
    ed in function __wrap_op_adds_xrefs
    idaapi.obj : error LNK2019: unresolved external symbol _visit_patched_bytes@16 r
    eferenced in function "int __cdecl py_visit_patched_bytes(unsigned int,unsigned
    int,struct _object *)" (?py_visit_patched_bytes@@YAHIIPAU_object@@@Z)
    idaapi.obj : error LNK2019: unresolved external symbol _get_ascii_contents2@28 r
    eferenced in function "struct _object * __cdecl py_get_ascii_contents2(unsigned
    int,unsigned int,int,int)" (?py_get_ascii_contents2@@YAPAU_object@@IIHH@Z)
    idaapi.obj : error LNK2019: unresolved external symbol _is_debugger_memory@4 ref
    erenced in function __wrap_is_debugger_memory
    idaapi.obj : error LNK2019: unresolved external symbol _qfsize@4 referenced in f
    unction __wrap_qfsize
    idaapi.obj : error LNK2019: unresolved external symbol _find_extlang_by_name@4 r
    eferenced in function __wrap_find_extlang_by_name
    idaapi.obj : error LNK2019: unresolved external symbol _run_statements@16 refere
    nced in function __wrap_run_statements
    idaapi.obj : error LNK2019: unresolved external symbol _visit_stroff_fields@20 r
    eferenced in function __wrap_visit_stroff_fields
    python.plw : fatal error LNK1120: 9 unresolved externals
    so i dig into the ida.lib

    the sdk 6.1 dosent have the symbols lets say the
    but they are in ida.lib 6.2 wonder if there is any way to patch a lib somehow and add these functions.(maybe hex edit)
    you can unzip ida.lib and pro.lib offcouse its gonna take forever to patch if its possible , but could be fun too :p
    Also there must be some kind off version check in the ida.lib
     
  20. computerline

    Well-Known Member Ida Pro Expert

    instead patch lib, you can find that function in idapython & in sdk and comment out, or add dummy function to it work :D
     
    storm shadow likes this.
Top