Giter VIP home page Giter VIP logo

ifred's Introduction

IDA command palette & more

Build Status

screenshot

How to build

Currently tested on Windows. Install Qt 5.6.3 and IDA SDK, and follow steps in azure-pipelines.yml.

You can download prebuilt plugins from azure pipelines.

Python API

You can make a custom palette in IDAPython.

from __palette__ import show_palette, Palette, Action
import random, string

myhandler = lambda item: sys.stdout.write('You selected: %s\n' % item.name)
random_str = lambda: "".join(random.choice(string.lowercase) for i in range(20))

entries = [Action(name=random_str(), # displayed text
    handler=myhandler, # callback
    id='action%d' % i # must be unique
    ) for i in range(20)]

show_palette(Palette('palette name here', 'placeholder here...', entries))

C++ API

Currently cleaning up C++ API. See standalone/ folder.

#include <palette/api.h>
#define COUNT 100

QVector<Action> testItems() {
    QVector<Action> action_list;

    action_list.reserve(COUNT + 1);
    action_list.push_back(Action("std::runtime_error", "raise exception", ""));

    for (int i = 0; i < COUNT; i++) {
        auto id = QString::number(rand());
        action_list.push_back(Action(id, id, ""));
    }

    return action_list;
}

const QString TestPluginPath(const char* name) {
    // Don't worry! also packaged with bundle theme!
    // Just point a writable path
    return QString("./path_to_plugin_theme/") + name;
}

int main() {
    QApplication app(argc, argv);

    set_path_handler(TestPluginPath);

    show_palette("<test palette>", "Enter item name...", testItems(), [](const Action & action) {
        if (action.id() == "std::runtime_error") {
            throw std::runtime_error("raised!");
        }
        qDebug() << action.id() << action.description() << action.shortcut();
        return false;
    });

    app.exec();
}

Changing theme

You can copy css, json files from palette/res/theme/<name>/* to %APPDATA%/Hex-rays/IDA Pro/plugins/palette/theme/, like the existing css, json files.

ayu white:

screenshot

ifred's People

Contributors

blue-devil avatar jinmo avatar nyx0 avatar yrp604 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

ifred's Issues

Errors loading ifred

Using the following config:

macOS 10.15.1
IDA 7.4 and IDAPython 3

I have the following errors while I'm loading IDA with the prebuilt plugins from azure pipelines:

dlopen(~/.idapro/plugins/ida_palette.dylib): dlopen(~/.idapro/plugins/ida_palette.dylib, 2): Symbol not found: _PyBaseObject_Type
  Referenced from: ~/.idapro/plugins/ida_palette.dylib
  Expected in: flat namespace
 in ~/.idapro/plugins/ida_palette.dylib
~/.idapro/plugins/ida_palette.dylib: can't load file

dlopen(~/.idapro/plugins/ida_palette.dylib): dlopen(~/.idapro/plugins/ida_palette.dylib, 2): Symbol not found: __ZN2QT17QAbstractItemView11eventFilterEPNS_7QObjectEPNS_6QEventE
  Referenced from: ~/.idapro/plugins/ida_palette.dylib
  Expected in: flat namespace
 in ~/.idapro/plugins/ida_palette.dylib
~/.idapro/plugins/ida_palette.dylib: can't load file

qt6 support

awesome tool!
do you plan to add support for qt6?

Python11 Support

Can you please provide prebuilt binaries for Python11

Thank you

Symbol not found

In IDA I got this behaviour (same for 32bits)

dlopen(/Users/user/.idapro/plugins/ida_palette64.dylib): dlopen(/Users/user/.idapro/plugins/ida_palette64.dylib, 2): Symbol not found: __ZN2QT17QAbstractItemView11eventFilterEPNS_7QObjectEPNS_6QEventE

when I compile it this warning shows up:

[...]
/Library/Developer/CommandLineTools/usr/bin/ranlib: file: palette/libpalette.a(action.cpp.o) has no symbols
[...]

it seems that line could be the issue:

using QAbstractItemView::keyPressEvent;

Any ideas?
Thanks

Linux Build - Py3.11

Hello Jinmo;

In azure pipelines I could not found Linux binaries, am I right?

I wonder how can I build plugin for linux! Thank you.

Warnings in MacOS

Hi,

A very useful plugin!
When i start IDA in MacOS, I receive the following "warnings":

dlopen(/Applications/IDA Pro 7.2/ida64.app/Contents/MacOS/plugins/ida_palette64.dylib): dlopen(/Applications/IDA Pro 7.2/ida64.app/Contents/MacOS/plugins/ida_palette64.dylib, 2): Symbol not found: _PyBaseObject_Type
  Referenced from: /Applications/IDA Pro 7.2/ida64.app/Contents/MacOS/plugins/ida_palette64.dylib
  Expected in: flat namespace
 in /Applications/IDA Pro 7.2/ida64.app/Contents/MacOS/plugins/ida_palette64.dylib
/Applications/IDA Pro 7.2/ida64.app/Contents/MacOS/plugins/ida_palette64.dylib: can't load file

But then the plugin works correctly.
Thanks!

IDA Pro SP3

Hello;
I got this error while using IDA Pro SP3:

LoadLibrary(C:\<program path here>\IDA 7.5 SP3\plugins\ida_palette64.dll) error: The specified module could not be found.
C:\<program path here>\IDA 7.5 SP3\plugins\ida_palette64.dll: can't load file

LoadLibrary(C:\<program path here>\IDA 7.5 SP3\plugins\ida_palette64.dll) error: The specified module could not be found.
C:\<program path here>\IDA 7.5 SP3\plugins\ida_palette64.dll: can't load file

Translation map support

IDA Pro's action is optimized for menu bar/popup menu. Maybe a translation table for builtin actions can be provided, so it can be optimized for the command palette.

Apple silicon arm64e arch support for mac

Current YAML builds dylibs that contains x86 only:

» file ida_palette.dylib
ida_palette.dylib: Mach-O 64-bit dynamically linked shared library x86_64

Would be great to have them contain both archs line so:

» file /bin/ls
/bin/ls: Mach-O universal binary with 2 architectures: [x86_64:Mach-O 64-bit executable x86_64] [arm64e:Mach-O 64-bit executable arm64e]
/bin/ls (for architecture x86_64):      Mach-O 64-bit executable x86_64
/bin/ls (for architecture arm64e):      Mach-O 64-bit executable arm64e

Thanks a lot in advance!

Settings window

  • Select theme
  • Manage custom palettes?
  • Open config.json
  • demangle or not

Maybe IDC/python script editor would be good, too.

cant download from azure

Hi,
I can see the "artifacts" in azure, but I cant download them. Can you make a release?
Thanks

Error loading the DLL

Hello,

I tried copying the DLL in my 'plugins' directory, and when loading any file, I get this error :
LoadLibrary(C:\Users\beauthi\AppData\Roaming/Hex-Rays/IDA Pro\plugins\ida_palette.dll) error: The specified module could not be found.
I tried Ctrl+Shift+P and Ctrl+P anyway, but both have default behaviors on IDA Pro, which are not ifred.
My configuration : Windows 10, IDA Pro 7.5.

Thank you

IDA Pro 7.7 SP1: The specified module could not be found.

Hello Jinmo

I am using IDA Pro 7.7 SP1 and python 3.10.2
I have downloaded the latest prebuilt artifacts.
I got this error:

LoadLibrary(C:\Program Files\<SNIP>\IDA\plugins\ida_palette64.dll) error: The specified module could not be found.
C:\Program Files\<SNIP>\IDA\plugins\ida_palette64.dll: can't load file

Can you provide an artifact for python 3.10 so i can try if that works? Thank you

Appears on wrong screen

I'm having a hard time building this on my machine or I would try to fix it myself: On Windows, if IDA is opened on a secondary monitor, the palette will still appear on the primary screen, which is a bit counter intuitive :)

IDA 7.7 Crashes Sometimes When Using ifred

Hello @Jinmo,

I really like ifred and using it all day during my reversing sessions. So thank you very much for making this great plugin!

But, for the IDA 7.7 it crashes sometimes. I guess you know that crashing IDA when reversing a application which is hundereds of megabytes is really annoying...

Here is a handful information for you:

ida_palette64 base address: 0x00007ffb212a0000

Stack:

Qt5Core!QT::QCoreApplicationPrivate::qmljsDebugArgumentsString+0x98
Qt5Core!QT::QMessageLogger::fatal+0x6d
Qt5Core!QT::QThread::~QThread+0xde
ida_palette64!PyInit___palette__+0x53231
ida_palette64!PyInit___palette__+0x5ff86
Qt5Core!QT::QObjectPrivate::deleteChildren+0x8b
Qt5Widgets!QT::QWidget::~QWidget+0x670
ida_palette64!PyInit___palette__+0x4ff56
Qt5Core!QT::QObjectPrivate::deleteChildren+0x8b
Qt5Widgets!QT::QWidget::~QWidget+0x670
ida_palette64!PyInit___palette__+0x4feb3
Qt5Core!QT::QObject::event+0xbb
Qt5Widgets!QT::QWidget::event+0xdf5
Qt5Widgets!QT::QApplicationPrivate::notify_helper+0x111
Qt5Widgets!QT::QApplication::notify+0x18b3
ida64_exe+0x11d449
ida64_exe+0x1bb6f0
Qt5Core!QT::QCoreApplication::notifyInternal2+0xbb
Qt5Core!QT::QCoreApplicationPrivate::sendPostedEvents+0x215
qwindows!qt_plugin_query_metadata+0x1fbf
Qt5Core!QT::QEventDispatcherWin32::processEvents+0x6a
qwindows!qt_plugin_query_metadata+0x1f99
Qt5Core!QT::QEventLoop::exec+0x1bf
Qt5Core!QT::QCoreApplication::exec+0x155
ida64_exe+0x1201f3
ida64_exe+0x12021c
ida64_exe+0x121169
ida64_exe+0x121226
ida64_exe+0x231efa

I'll be very happy if you can look into it. By the way, it does not always crashes the IDA. This stack trace is from ntoskrnl.exe. I guess it crashes when application has a lot of functions etc...

Thank you in advance!

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.