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

Storm Shadow

Administrator
Staff member
Developer
Ida Pro Expert
Elite Cracker
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:
 

Attachments

  • idapython-1.5.2_ida6.1_py2.7_win32.zip
    1.8 MB · Views: 13

Storm Shadow

Administrator
Staff member
Developer
Ida Pro Expert
Elite Cracker
;)
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
 

Storm Shadow

Administrator
Staff member
Developer
Ida Pro Expert
Elite Cracker
here
You have to use idc.py from 1.5.2 version
els its gonna crash
 

Attachments

  • idapython-1.5.3_ida6.1_py2.7_win32.zip
    1.8 MB · Views: 30
  • idc.rar
    45.7 KB · Views: 25

Storm Shadow

Administrator
Staff member
Developer
Ida Pro Expert
Elite Cracker
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
 

computerline

New 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
 

Storm Shadow

Administrator
Staff member
Developer
Ida Pro Expert
Elite Cracker
i messed up my local account
My admin acount have some trouble with PyQt

When trying the ida\exampels\ex_pyqt.py

Code:
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:
>>> 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:
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:
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
 

computerline

New 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

Administrator
Staff member
Developer
Ida Pro Expert
Elite Cracker
the python PyQt dosent have the option to build
Code:
configure -debug-and-release -platform win32-msvc2008 -no-qt3support -qtnamespace QT

i dowloaded the windows QT build with code

Code:
C:\Qt\4.8.5>configure -opensource -confirm-license -release -platform win32-msvc
2010 -no-qt3support-qtnamespace QT

after 3 hours off building

Code:
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.

:(
 

Storm Shadow

Administrator
Staff member
Developer
Ida Pro Expert
Elite Cracker
yeah i used that guide gives back the error

it chrashed after 3 hours off nmake


Code:
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
 

computerline

New 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:
https://mega.co.nz/#F!IN0TCAKD!dGZdKOL1OiNVjeDqz4GzvA
 

computerline

New member
Ida Pro Expert
You need :
1. Build Qt with QT_NAMESPACE support
2. Build SIP with QT_NAMESPACE
Code:
configure.py DEFINES+=QT_NAMESPACE=x
3. Edit sipconfig.py
Code:
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:
configure.py -w
 

Storm Shadow

Administrator
Staff member
Developer
Ida Pro Expert
Elite Cracker
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:
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
symbol _qvector_reserve@16 refer
enced in function __wrap_qvector_reserve
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
 
Top