Giter Site home page Giter Site logo

mizari / phrank Goto Github PK

View Code? Open in Web Editor NEW
61.0 7.0 2.0 701 KB

Tool that automates some useful structure routines in IDA PRO

License: MIT License

Python 100.00%
idapro hexrays hexrays-decompiler reverse-engineering hacking hacking-tool idapython

phrank's Introduction

Post HexRays ANalysis Kit

About

Phrank helps with structure analysis and function pointers. Phrank works on top of HexRays ctrees.

Installation

  1. Copy/link phrank_plugin.py to IDAPRO/plugins/
  2. Copy/link pyphrank and phrank.py to IDAPRO/python/3/ folder

Capabilities

  1. Analyze pointer variable: automatically calculate pointed structure size, create new structure and set variable type

2) Analyze C++ classes with multiple inheritance: detect multiple inheritance among C++ classses, detect virtual tables, create structures for virtual tables, detect and set C++ objects in functions

How to use

There are currently two ways to use phrank: hotkey actions (described here and in comments here) and phrank api (described in docstring comments here).

phrank's People

Contributors

mizari avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Forkers

clayne gmh5225

phrank's Issues

IDA version compatibility

I have two version IDA, 7.6 and 8.3
I tried to use the plugin in both versions, nothing happen when i used hotkey (Shift-A) like in this script

void __fastcall game_matrix_render(__int64 a1)
{
  int v2; // eax
  float v3; // xmm2_4
  __int64 v4; // rdx
  float v5; // xmm4_4
  __int128 v6; // xmm1
  float v7; // xmm3_4
  __int64 v8; // rcx
  __int64 v9; // rax
  __int128 v10; // xmm0
  __int64 v11; // r8
  int v12; // ecx
  int v13; // er9
  int v14; // er9
  windowSize *window_size; // rcx

  (*(*a1 + 80i64))(a1, (right_axis * bottom_axis));
  v2 = right_axis;
  v3 = 0.0;
  if ( right_axis > 0.0 )
  {
    v4 = 0i64;
    v5 = bottom_axis;
    do
    {
      v6 = 0i64;
      if ( v5 > 0.0 )
      {
        v7 = v3 + 1.0;
        v8 = 48 * v4;
        do
        {
          v9 = *(a1 + 120);
          v10 = v6;
          *&v10 = *&v6 + 1.0;
          ++v4;
          *(v8 + v9 + 4) = v6;
          *(v8 + v9 + 12) = v6;
          *(v8 + v9 + 36) = v6;
          v6 = v10;
          *(v8 + v9 + 20) = v10;
          *(v8 + v9 + 28) = v10;
          *(v8 + v9 + 44) = v10;
          *(v8 + v9) = v3;
          *(v8 + v9 + 8) = v7;
          *(v8 + v9 + 16) = v3;
          *(v8 + v9 + 24) = v3;
          *(v8 + v9 + 32) = v7;
          *(v8 + v9 + 40) = v7;
          v8 += 48i64;
          v5 = bottom_axis;
        }
        while ( bottom_axis > *&v10 );
        v2 = right_axis;
      }
      v3 = v3 + 1.0;
    }
    while ( v2 > v3 );
  }
  glEnableClientState(GL_COLOR_ARRAY);
  if ( *(a1 + 152) + *(a1 + 156) || CURSE <= 0 || (*init & 2) == 0 )
  {
    window_size = *(a1 + 104);
    *(a1 + 176) = window_size->width;
    *(a1 + 180) = window_size->height;
    *(a1 + 168) = 0i64;
  }
  else
  {
    v11 = *(a1 + 104);
    v12 = right_axis * *(a1 + 112);
    v13 = *(a1 + 116);
    *(a1 + 176) = v12;
    v14 = bottom_axis * v13;
    *(a1 + 180) = v14;
    *(a1 + 168) = (*(v11 + 16) - v12) / 2;
    *(a1 + 172) = (*(v11 + 20) - v14) / 2;
  }
  glViewport(*(a1 + 168), *(a1 + 172), *(a1 + 176), *(a1 + 180));
  glMatrixMode(GL_MODELVIEW);
  glLoadIdentity();
  glMatrixMode(GL_PROJECTION);
  glLoadIdentity();
  gluOrtho2D(0.0, right_axis, bottom_axis, 0.0);
}

The a1 variable should have a struct for it, but the plugin not doing anything.
Can you show me how to use it in detail, or is it plugin work from the older version?

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.