Giter Club home page Giter Club logo

ida-climacros's Introduction

What is climacros?

CLI macros is a productivity tool that lets you define and use static or dynamic macros in IDA's command line interfaces (Python, IDC, WinDbg, BochDbg, Gdb, etc.).

Quick introduction

Usage

When installed, climacros is always active. It comes with predetermined set of macros:

Default macros

To create or edit new macros, simply invoke the macro editor from the "Quick plugins view" window (Ctrl-3).

Static macros

Static macros get substituted as-is in the CLI. For example the following macro:

Static macro

Outputs the following when executed:

Static macro output

Dynamic macros

It is possible to define dynamic macros that get expanded as a result of evaluating a Python expression that returns a string. For example, the idc.here() command is very useful and can be abbreviated with a shorter macro, say $! or ${here}.

To define a dynamic macro, just surround the its expression with ${ and }$.

The long form macro ${here} for the idc.here() expression is defined like this:

Long form here() macro

The short form $!:

Long form here() macro

A macro is invoked when it is present in a CLI command:

Long form here() macro

Inline substitution

You don't have to define macros in order to get expressions expansion in the CLI. If you need a one-off expression expansion in the CLI, just define the expression inline:

fn = "test_${str(sum(range(10)))}$.bin"

Or:

v = "${str(1 + 2 + 3 + 4)}$"

The expression should always evaluate to a string, therefore always remember to str() the expression or to format it "%x" % expr if it does not return a string.

Installation

climacros is written in C++ with IDA's SDK and therefore it should be deployed like a regular plugin. Copy the plugin binaries to either of those locations:

  • <IDA_install_folder>/plugins
  • %APPDATA%\Hex-Rays/plugins

Since the plugin uses IDA's SDK and no other OS specific functions, the plugin should be compilable for macOS and Linux just fine. I only provide MS Windows binaries. Please check the releases page.

The first time you run the plugin, it will be populate with the default macros. If you delete all the macros, you won't get back the default macros unless you delete the following file: %APPDATA%\Hex-Rays/firstrun.climacros.

ida-climacros's People

Contributors

0xeb avatar

Watchers

 avatar

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.