A simple REST-like API for basic interoperability with IDA Pro.
Copy idarest.py to IDA Pro's plugin directory.
Use the Edit menu in IDA Pro to start and stop the plugin
- Edit -> Start IDARest
- Edit -> Stop IDARest
When starting the plugin you will be asked for the listening host and port.
Provide it in '''host:port''' format. 127.0.0.1:8899
is the default setting.
All APIs can be accessed with either GET or POST requests. Arguments in GET requests are passed as URL parameters. Arguments in POST requests are passed as JSON.
HTTP status returned will always be 200, 400, or 404.
404 occurs when requesting an unknown URL / API.
400 occurs for
- Bad POST arguments (must be application/json or malformed JSON)
- Bad QUERY arguments (specifying the same var multiple times)
200 will be returned for everything else, including invalid API argument values.
All responses will be either JSON (application/json
) or JSONP
(application/javascript
) with JSON being the default format. To have JSONP
returned, specify a URL parameter callback
with both POST and GET requests.
All responses (errors and non-errors) have code
and msg
fields. Responses
which have a 200 code also have a data
field with additional information.
- Numbers will be returned as hex formatted (0xABCD) strings.
- Input numbers must be provided in hex form
ea
is commonly used as address- Color input is RRGGBB format in hex
Example:
curl http://127.0.0.1:8899/ida/api/v1.0/info
Example:
curl http://127.0.0.1:8899/ida/api/v1.0/cursor
curl http://127.0.0.1:8899/ida/api/v1.0/cursor?ea=0x89ab
Example:
curl http://127.0.0.1:8899/ida/api/v1.0/segments
curl http://127.0.0.1:8899/ida/api/v1.0/segments?ea=0x89ab
Example:
curl http://127.0.0.1:8899/ida/api/v1.0/names
Example:
curl http://127.0.0.1:8899/ida/api/v1.0/color?ea=0x89ab
curl http://127.0.0.1:8899/ida/api/v1.0/color?ea=0x89ab?color=FF0000
- query
- HTTPRequestHandler.prefn
- HTTPRequestHandler.postfn
- HTTPRequestHandler.route
- @check_ea
- @require_params
- IDARequestError