Giter Site home page Giter Site logo

python_editor's Introduction

Ida Pro python Editor Python version Python version PyQ5t PyQ5t

what it Does: I always hated the Old Run script command, so i set up making my own editor for ida pro. Just like the ida one but much nicer and better Python language. Run Scripts files and apps within ida.

prerequisites

ida pro or ida pro demo

PyQt4/or PyQt5 depends on ida pro version.

It needs Qscilla module(Qsci.pyd), not provided by hex-ray, but found in the links under.

Pyqt4 installer

Pyqt4

Pyqt5 installer

Pyqt5

Pyqt5 ida pro 7.0

PyQt5 for 7.2 is shipped within the package

IMPORTANT! you have to take Qt5Core.dll , Qt5Gui.dll, Qt5widgets.dll from PyQt5 package and overwrite the ones in ida pro 7.0 folder

build yourself

https://github.com/techbliss/Ida_Pro_Ultimate_Qt_Build_Guide

if you need help with this. Contact me here Techbliss

Running other Qt apps within the editor

you have to remember to remove usually in bottom of Qt file

app = QtGui.QApplication(sys.argv)

and

sys.exit(app.exec_())

Install

Download plugin. extract to Ida Pro plugins folder.So its idafolder\plugins\codeeditor or it wont work

Tip! Use hit hotkey Alt+E twize to load the editor.

Current Changelog 1.7

Updated for ida pro 7.5

Hotkeys

 ###################################################
 #              Author Storm Shadow                # 
 #                   Hotkeys                       # 
 #         NewFile:            Ctrl+N              #
 #         OpenFile:           Ctrl+O              #
 #         SaveFile:           Ctrl+S              #
 #         RunScript:          Ctrl+E              #
 #         Undo:               Ctrl+Z              #
 #         Redo:               Ctrl+Y              #
 #         SelectALL:          Ctrl+A              #
 #         Paste:              Ctrl+V              #
 #         Font:               Ctrl+F              #
 #         ResetFolding:       Ctrl+R              #
 #         CircleFolding:      Ctrl+C              #
 #         PlainFolding:       Ctrl+P              #
 #         HEX-ray Home:       Ctrl+W              #
 #         Ida Pro Python SDK  Ctrl+I              #
 #         IDAPROPythonGit:    Ctrl+G              #
 #         Author:             Ctrl+B              #
 #         Enable Reg:         Alt+E               #
 #         Disable Reg:        Alt+D               #
 #         Zoom in             Ctrl+Shift+ +       #
 #         Zoom Out            Ctrl+Shift+ -       #
 #         Profile Code        Ctrl+Shift+ E       #
 ###################################################
 #              IDA PRO python Editor              #
 ###################################################

d

autocomplete

ida

Plugin Manager

Plugin Manager

profile code for speed issues

    177 function calls in 0.038 seconds

   Ordered by: standard name

   ncalls  tottime  percall  cumtime  percall filename:lineno(function)
        1    0.000    0.000    0.000    0.000 <string>:330(retranslateUi)
        1    0.012    0.012    0.038    0.038 <string>:4(<module>)
        1    0.000    0.000    0.000    0.000 <string>:458(MyWindow)
        9    0.000    0.000    0.000    0.000 <string>:80(_fromUtf8)
        2    0.000    0.000    0.000    0.000 <string>:91(_translate)
        1    0.000    0.000    0.000    0.000 <string>:94(Ui_MainWindow)
        1    0.005    0.005    0.013    0.013 <string>:96(setupUi)
        2    0.000    0.000    0.000    0.000 {built-in method SendScintilla}
       19    0.000    0.000    0.000    0.000 {built-in method addAction}
        1    0.000    0.000    0.000    0.000 {built-in method addPixmap}
       19    0.000    0.000    0.000    0.000 {built-in method addSeparator}
        1    0.000    0.000    0.000    0.000 {built-in method addToolBar}
        1    0.000    0.000    0.000    0.000 {built-in method addWidget}
        1    0.000    0.000    0.000    0.000 {built-in method exec_}
        3    0.006    0.002    0.006    0.002 {built-in method load}
        1    0.000    0.000    0.000    0.000 {built-in method markerDefine}
        1    0.000    0.000    0.000    0.000 {built-in method prepare}
        2    0.000    0.000    0.000    0.000 {built-in method resize}
        1    0.000    0.000    0.000    0.000 {built-in method setAutoCompletionSource}
        3    0.000    0.000    0.000    0.000 {built-in method setAutoCompletionThreshold}
        2    0.000    0.000    0.000    0.000 {built-in method setAutoFillBackground}
        1    0.000    0.000    0.000    0.000 {built-in method setAutoIndent}
        1    0.000    0.000    0.000    0.000 {built-in method setBraceMatching}
        1    0.000    0.000    0.000    0.000 {built-in method setCentralWidget}
        1    0.000    0.000    0.000    0.000 {built-in method setContentsMargins}
        1    0.000    0.000    0.000    0.000 {built-in method setDefaultFont}
        1    0.000    0.000    0.000    0.000 {built-in method setEolFill}
        1    0.000    0.000    0.000    0.000 {built-in method setFamily}
        1    0.000    0.000    0.000    0.000 {built-in method setFixedPitch}
        1    0.000    0.000    0.000    0.000 {built-in method setFont}
        1    0.000    0.000    0.000    0.000 {built-in method setFrameShape}
        1    0.000    0.000    0.000    0.000 {built-in method setIconSize}
        1    0.000    0.000    0.000    0.000 {built-in method setLexer}
        1    0.000    0.000    0.000    0.000 {built-in method setMarginSensitivity}
        1    0.000    0.000    0.000    0.000 {built-in method setMarginWidth}
        1    0.000    0.000    0.000    0.000 {built-in method setMarginsFont}
        1    0.000    0.000    0.000    0.000 {built-in method setMarkerBackgroundColor}
        5    0.000    0.000    0.000    0.000 {built-in method setObjectName}
        1    0.000    0.000    0.000    0.000 {built-in method setPointSize}
       19    0.000    0.000    0.000    0.000 {built-in method setShortcut}
        1    0.000    0.000    0.000    0.000 {built-in method setSpacing}
       19    0.000    0.000    0.000    0.000 {built-in method setStatusTip}
        1    0.000    0.000    0.000    0.000 {built-in method setStyleSheet}
        1    0.000    0.000    0.000    0.000 {built-in method setTabWidth}
        1    0.000    0.000    0.000    0.000 {built-in method setToolButtonStyle}
        1    0.000    0.000    0.000    0.000 {built-in method setToolTip}
        1    0.000    0.000    0.000    0.000 {built-in method setWhatsThis}
        1    0.000    0.000    0.000    0.000 {built-in method setWindowIcon}
        2    0.000    0.000    0.000    0.000 {built-in method setWindowTitle}
        1    0.013    0.013    0.013    0.013 {built-in method show}
        1    0.000    0.000    0.000    0.000 {built-in method width}
        1    0.001    0.001    0.001    0.001 {connectSlotsByName}
        2    0.000    0.000    0.000    0.000 {hasattr}
        1    0.000    0.000    0.000    0.000 {instance}
       20    0.000    0.000    0.000    0.000 {method 'connect' of 'PyQt5.QtCore.pyqtBoundSignal' objects}
        1    0.000    0.000    0.000    0.000 {method 'disable' of '_lsprof.Profiler' objects}
        2    0.000    0.000    0.000    0.000 {method 'insert' of 'list' objects}
        2    0.000    0.000    0.000    0.000 {nt.getcwd}
        2    0.000    0.000    0.000    0.000 {setAttribute}
        2    0.000    0.000    0.000    0.000 {translate}```







python_editor's People

Contributors

techbliss avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

python_editor's Issues

"cannot import name QsciScintilla" on Windows 10 & IDA Pro 7.2

Hi,

I'm trying to install this plugin on my Ida Pro 7.2.

I have successfully uploaded all files to "Program Files\IDA 7.2\python" folder overwriting my PyQT5 folder. I also loaded the specific plugin in the folder "Program Files\IDA 7.2\plugins" but when I go to run the plugin it gives me this error:

Traceback (most recent call last): File "C:\Program Files\IDA 7.2\python\ida_idaapi.py", line 572, in IDAPython_ExecScript execfile(script, g) File "C:/Program Files/IDA 7.2/plugins/Code editor/pyeditor.py", line 65, in <module> from PyQt5.Qsci import QsciScintilla, QsciLexerPython ImportError: cannot import name QsciScintilla

it looks like it can load the QtCore and QtGui modules but can't find the QsciScintilla module.

How can I solve this problem?

Thanks in advance.

Please support IDA Pro 7.0

As title, the IDAPython API has changed a lot in the latest release of IDA Pro.

For example, both idaapi.add_menu_item & idaapi.set_menu_item_icon are removed, which causes error and fail to load the python editor.

It would be nice if we could still use this awesome editor in the latest IDA :)

not found qsci

Traceback (most recent call last):
File ".\pyeditor.py", line 56, in
from PyQt5.Qsci import QsciScintilla, QsciLexerPython
ImportError: DLL load failed: not found require oprogram file

Not work for Windows

Unable to locate program entry point ?setSelectionMode@QAbstractItemView@QT@@QEAAXW4SelectionMode@12@@z Dynamic link library D:\IDA 7.0\ida.exe。
Unable to locate program entry point ?staticMetaObject@QLineEdit@QT@@2UQMetaObject@2@B Dynamic link library D:\IDA 7.0\Qt5PrintSupport.dll。

It took two days , not solved
Use now pycharm edit 。。。。

Problems with Qsci

Dear developer,

Good morning. How are you?

Even after installing from https://mega.nz/#!Dt9xHD7D!bwZVrOd4H4EpsW9c3iz1rU9R_x_LogYQMto8wu6IF4c , I have faced the following message while trying to call the ALT+E shortcut:

cannot import name Qsci
Traceback (most recent call last):
File "C:\Program Files (x86)\IDA 6.95\python\ida_idaapi.py", line 509, in IDAPython_ExecScript
execfile(script, g)
File "C:\Program Files (x86)\IDA 6.95\plugins\Code editor\pyeditor.py", line 44, in
from PyQt5 import QtCore, QtGui, Qsci, QtWidgets, Qt
ImportError: cannot import name Qsci

The environment is a Win7x64 SP1 with Python 2.7. Additionally, my IDA Pro is 6.95.

Thank you and have a nice day.

Alex.

error?

Z:\Users\os\IDAPro7.5\plugins\Python_editor.py: qRegisterResourceData(int, bytes, bytes, bytes): argument 2 has unexpected type 'str'
Traceback (most recent call last):
File "Z:\Users\os\IDAPro7.5\python\3\ida_idaapi.py", line 616, in IDAPython_ExecScript
exec(code, g)
File "Z:/Users/os/IDAPro7.5/plugins/Python_editor.py", line 11, in
import ico
File "Z:\Users\os\IDAPro7.5\plugins\Code editor\icons\ico.py", line 1867, in
qInitResources()
File "Z:\Users\os\IDAPro7.5\plugins\Code editor\icons\ico.py", line 1862, in qInitResources
QtCore.qRegisterResourceData(0x01, qt_resource_struct, qt_resource_name, qt_resource_data)
TypeError: qRegisterResourceData(int, bytes, bytes, bytes): argument 2 has unexpected type 'str'

IDA 7.5 qRegisterResourceData(int, bytes, bytes, bytes): argument 2 has unexpected type 'str'

TODO:
D:\IDA Pro 7.5 SP3\IDA Pro 7.5 SP3(x86, x64, ARM, ARM64, PPC, PPC64, MIPS)\plugins\Python_editor.py: qRegisterResourceData(int, bytes, bytes, bytes): argument 2 has unexpected type 'str' Traceback (most recent call last): File "D:\IDA Pro 7.5 SP3\IDA Pro 7.5 SP3(x86, x64, ARM, ARM64, PPC, PPC64, MIPS)\python\3\ida_idaapi.py", line 616, in IDAPython_ExecScript exec(code, g) File "D:/IDA Pro 7.5 SP3/IDA Pro 7.5 SP3(x86, x64, ARM, ARM64, PPC, PPC64, MIPS)/plugins/Python_editor.py", line 11, in <module> import ico File "D:\IDA Pro 7.5 SP3\IDA Pro 7.5 SP3(x86, x64, ARM, ARM64, PPC, PPC64, MIPS)\plugins\Code editor\icons\ico.py", line 1867, in <module> qInitResources() File "D:\IDA Pro 7.5 SP3\IDA Pro 7.5 SP3(x86, x64, ARM, ARM64, PPC, PPC64, MIPS)\plugins\Code editor\icons\ico.py", line 1862, in qInitResources QtCore.qRegisterResourceData(0x01, qt_resource_struct, qt_resource_name, qt_resource_data) TypeError: qRegisterResourceData(int, bytes, bytes, bytes): argument 2 has unexpected type 'str'

i didn't find README_python3.txt file

Not work for Mac

Not work in MacOS.

Traceback (most recent call last):
  File "/Applications/IDA Pro 7.0/ida.app/Contents/MacOS/python/ida_idaapi.py", line 553, in IDAPython_ExecScript
    execfile(script, g)
  File "/Applications/IDA Pro 7.0/ida.app/Contents/MacOS/plugins/Python_editor.py", line 9, in <module>
    import ico
ImportError: No module named ico
[Errno 2] No such file or directory: '/Applications/IDA Pro 7.0/ida.app/Contents/MacOS/plugins\\Code editor\\pyeditor.py'
Traceback (most recent call last):
  File "/Applications/IDA Pro 7.0/ida.app/Contents/MacOS/python/ida_idaapi.py", line 553, in IDAPython_ExecScript
    execfile(script, g)
IOError: [Errno 2] No such file or directory: '/Applications/IDA Pro 7.0/ida.app/Contents/MacOS/plugins\\Code editor\\pyeditor.py'
No module named Qsci
Traceback (most recent call last):
  File "/Applications/IDA Pro 7.0/ida.app/Contents/MacOS/python/ida_idaapi.py", line 553, in IDAPython_ExecScript
    execfile(script, g)
  File "/Applications/IDA Pro 7.0/ida.app/Contents/MacOS/plugins/Code editor/pyeditor.py", line 56, in <module>
    from PyQt5.Qsci import QsciScintilla, QsciLexerPython
ImportError: No module named Qsci

Please help me.

@techbliss
My IDA version is 6.8,
My Python version is 2.7.13
Can you provide the latest idapython plugin? I can't compile!
The plugin author has not updated for a long time
Failed to install using the old plug-in,It could be the python version problem
Script editor rely on idapython plugin?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.