Giter VIP home page Giter VIP logo

ida-rpyc's Introduction

IDA-RPyC

An IDA plugin that allows you call IDA python APIs from remote.

1. How to use

  1. Install rpyc:

    $ pip install rpyc
  2. Copy the script ida-rpyc.py to <IDA install directory>\plugins.

  3. Open IDA. Select Edit -> Plugins -> IDA-RPyC. A window would pop up:

  4. You can choose direct or SSL mode. Once parameters are set, you can click Start to start an RPyC server.

  5. Now, at remote side, you can call IDA python APIs like this:

    import rpyc
    
    conn = rpyc.connect('localhost', 54444, service = rpyc.MasterService)
    
    current_ea = conn.modules.idc.here()
    some_bytes = comm.modules.idaapi.get_bytes(current_ea, 4)
    print('0x{:x}: {}'.format(current_ea, some_bytes))

2. Useful tips

If you are writing an IDA script at remote side with the help of IDEs such as PyCharm, you may find that conn.modules.idaapi. doesn't trigger code autocomplete.

A solution for this would be using typing.TYPE_CHECKING:

import typing

if typing.TYPE_CHECKING:
    import idc, idaapi
else:
    import rpyc

    conn = rpyc.connect('localhost', 54444, service = rpyc.MasterService)

    idc = conn.modules.idc
    idaapi = conn.modules.idaapi

When you are writing the script, only import idc, idaapi is visible to IDE's type checking system. So the system will collect information about classes, variables, functions and so on from the corresponding modules. Therefore, code autocomplete will come back working.

When you are running the script, such idc, idaapi modules won't be imported and will be redirected to the modules at IDA-RPyC server you connected. You need not do any further modification to your script and it will still work as you expected.

3. Screen recoding

screen-recording.png

ida-rpyc's People

Contributors

hypersine avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  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.