Giter VIP home page Giter VIP logo

idapkg's Introduction

Package manager for IDA Pro

WARNING: This project is still between alpha and beta state. Feel free to report bugs if this is not working!

How to install

Execute the script below in IDAPython console (minified installer.py.)

import zipfile,tempfile,sys,os,threading,shutil,importlib
def install():P=os.path;tag='v0.1.4';n=tempfile.NamedTemporaryFile(delete=False,suffix='.zip');n.close();print('Started downloading idapkg...');importlib.import_module('urllib.request' if sys.version_info.major==3 else 'urllib').urlretrieve('https://github.com/Jinmo/idapkg/archive/%s.zip'%tag,n.name);f=open(n.name,'rb+');f.seek(0,os.SEEK_END);f.truncate(f.tell()-0x28);f.close();z=zipfile.ZipFile(n.name);base=z.namelist()[0];sys.path.append(P.join(n.name,base));from pkg.config import g;import pkg.main as main;packages_path=g['path']['packages'];z.extractall(packages_path);z.close();dest=P.join(packages_path,'idapkg');P.isdir(dest)and shutil.rmtree(dest);os.rename(P.join(packages_path,base),dest);main.update_pythonrc();main.init_environment(False);print('Installation success! Please restart IDA to use idapkg.');os.unlink(n.name)
threading.Thread(target=install).start()

Then you can access related actions via command palette (Ctrl+Shift+P on windows/mac/linux, or Command+Shift+P on mac) after restarting IDA Pro.

Testing latest changes

To test the master branch, you can replace tag='v...' into tag='master'.

What file is created

~(Your home directory)/idapkg, and some lines in idapythonrc.py will be created.

idapkg/
  packages/
  python/
  config.json

packages/

When a package is installed, packages/<name> is created and further added to IDAUSR variable. This enables following folders to be loaded by IDA Pro.

<name>
  plugins/
  procs/
  loaders/
  til/
  sig/
  ids/

python/ - virtualenv

To manage PIP packages easily, this creates a virtualenv and creates pip, easy_install and other virtalenv-related files and activates the environment.

TL;DR If you run pip install, they are installed into python/lib/* (Lib on windows, all same.)

config.json

In fact, all paths above are configurable!

{
    "path": {
        "virtualenv": "...\\idapkg\\python", 
        "packages": "...\\idapkg\\packages"
    }, 
    "repos": [
        "https://api.idapkg.com",
        "github:Jinmo/idapkg-repo/master"
    ]
}

And you can use your private repo for fetching packages. The api server will be uploaded soon!

Writing a package

See Writing a package (link).

TODO

Currently finding way to reliably and generally update IDAUSR variable on all platforms. Currently only supporting Windows and Mac OS X.

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.