GithubHelp home page GithubHelp logo

tempbottle / ios-hooker Goto Github PK

View Code? Open in Web Editor NEW

This project forked from moloch--/ios-hooker

0.0 1.0 0.0 138 KB

Python script to parse Objective-C header files from iOS applications and generate function hooks.

License: GNU General Public License v2.0

Python 100.00%

ios-hooker's Introduction

ios-hooker

This a Python script to aid in reverse engineering iOS applications. It's a hacky Objc header parser, and can automatically generate function hooks based on class dumps. For best results use class-dump-z

  • GPLv2

ios-hooker.py

Automatically parse objective-c header files and produce hooks for class methods, instance methods, and class properties. Compile generated hooks using Theos

mkdir header_files
class-dump-z iOSApp -H -o ./header_files
hooker.py --target ./header_files -g -s -l

or target a single class file:

ios-hooker.py --target FooHeader.h -g -s -l

or multiple files:

ios-hooker.py --target FooHeader.h BarHeader.h -g -s -l

Usage

usage: ios-hooker.py [-h] [--version] [--verbose] --target
                     [TARGET [TARGET ...]] [--output OUTPUT] [--append]
                     [--next-step] [--load-hook] [--unknown-types]
                     [--file-regex FILE_REGEX] [--method-regex METHOD_REGEX]
                     [--getters] [--setters] [--params] [--debug]

Generate hooks for an objc class header file

optional arguments:
  -h, --help            show this help message and exit
  --version             show program's version number and exit
  --verbose, -v         display verbose output (default: false)
  --target [TARGET [TARGET ...]], -t [TARGET [TARGET ...]]
                        file or directory with objc header file(s)
  --output OUTPUT, -o OUTPUT
                        output file with hooks (default: Tweak.xm)
  --append, -a          append output file (default: false)
  --next-step, -n       parse and hook NS class files (default: false)
  --load-hook, -l       generate hook when dylib is loaded (default: false)
  --unknown-types, -u   create hooks for functions with unknown return types
                        (may cause compiler errors)
  --file-regex FILE_REGEX, -f FILE_REGEX
                        only hook classes with file names that match a given
                        regex (only valid with directory)
  --method-regex METHOD_REGEX, -m METHOD_REGEX
                        only create hooks for methods that match a given regex
  --getters, -g         create hooks for @property getters (default: false)
  --setters, -s         create hooks for @property setters (default: false)
  --params, -p          log function parameter values (default: false)
  --debug               create debug logging messages for getters/setters
                        (default: false)

ios-hooker's People

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.