This is a plugin for IDA Pro. It adds the JavaScript language to IDA Pro:
- adds the "File, JavaScript file..." menu item to execute arbitrary .js files
- adds JavaScript command line interpreter (accessible by pressing dot in the disassembly view; languages can be switched by pressing the Ctrl-Up and Ctrl-Down keys)
- adds the UseJavaScript() IDC function to replace the IDC by JavaScript everywhere in IDA. After executing "UseJavaScript(1)" in IDC, all expressions and entered numeric values in dialog boxes are interpreted in JavaScript
- adds the -Ojs:file command line option to execute a JavaScript file at the start
Currently the plugin makes all IDC built-in functions accessible in JavaScript.
All required type conversions are performed automatically.
In the future we plan to publish object oriented API to IDA objects (functions, segments, instructions, etc).
All scripts and expressions are calculated in the same execution context.
In other words, all definitions stay in the memory until IDA stops working.
Closing and opening another database does not reset the execution context.