Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/jinmo/ifred
IDA command palette & more (Ctrl+Shift+P, Ctrl+P)
https://github.com/jinmo/ifred
Last synced: 3 months ago
JSON representation
IDA command palette & more (Ctrl+Shift+P, Ctrl+P)
- Host: GitHub
- URL: https://github.com/jinmo/ifred
- Owner: Jinmo
- Created: 2018-10-10T16:58:56.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2024-05-04T08:47:15.000Z (7 months ago)
- Last Synced: 2024-05-04T09:33:36.505Z (7 months ago)
- Language: C++
- Homepage:
- Size: 346 KB
- Stars: 134
- Watchers: 8
- Forks: 14
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# IDA command palette & more
[![Build Status](https://jinmo123.visualstudio.com/idapkg/_apis/build/status/Jinmo.ifred?branchName=master)](https://jinmo123.visualstudio.com/idapkg/_build/latest?definitionId=1&branchName=master)
![screenshot](screenshots/1.png)
## 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](https://jinmo123.visualstudio.com/idapkg/_build/latest?definitionId=1&branchName=master)
from azure pipelines.## Python API
You can make a custom palette in IDAPython.
```py
from __palette__ import show_palette, Palette, Action
import random, stringmyhandler = 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.
```cpp
#include
#define COUNT 100QVector testItems() {
QVector 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("", "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//*` to `%APPDATA%/Hex-rays/IDA Pro/plugins/palette/theme/`,
like the existing css, json files.ayu white:
![screenshot](screenshots/2.png)