Coder Social home page Coder Social logo

firewolf-ljw / liberation Goto Github PK

View Code? Open in Web Editor NEW

This project forked from razzile/liberation

0.0 2.0 0.0 22.67 MB

The long awaited, (still not finished) sequal to code inject! Cheaters watch this space...

CMake 40.30% C++ 49.17% Shell 2.52% Objective-C++ 3.50% Objective-C 4.51%

liberation's Introduction

Liberation

Check the unfinished branch for a preview of things I am working on.

Liberation (formerly civ3) is a next generation code injection library for iOS cheaters everywhere. Unlike liberation's predecessor writeData, which was hardly ever updated and had tons of random edits floating around the net, Liberation will be updated regularly in this repo, and contributions are welcome from anyone (even if you aren't a member of ioscheaters)

Installation

To install Liberation, please follow these steps:

  • Download Liberation from the Releases page.
  • Copy the lib folder contents to $THEOS/lib
  • Copy the include folder to $THEOS/include
  • (Optional) copy the nic template folder to $THEOS/templates/ios/liberation

Usage

To use Liberation, follow these steps:

  • Inlcude <Liberation.h> in your Tweak.xm (or any other (obj)c++ file)
  • Use liberation functions in your tweak
  • Add YOURPROJECTHERE_CFLAGS += -std=c++11 to your makefile to enable c++11 (required by Liberation)
  • (Optional) Add TARGET_STRIP_FLAGS = -u -r -s /dev/null to the top of your makefile to strip your dylib (Recommended as Liberation will otherwise contain a lot of info about your tweak). Must build using make DEBUG=0 for symbols to be stripped
  • Add YOURPROJECTHERE_LIBRARIES = Liberation c++ to your Makefile

That's it!

Example

#include <Liberation.h>

void Init() {
    Settings settings("myPrefs.plist");

    // create patch from ARM hex
    Patch *goldPatch = Patch::CreatePatch(0x12345, 0x0000A0E1);
    // create patch from instruction string
    Patch *healthPatch = Patch::CreateInstrPatch(0x12346, "MOV RO, R7; BX LR");

    // create a hook patch
    Hook xpHook = Hook("__symbol", someFunc, &someOtherFunc);

    bool gold = settings["kGold"];
    if (gold) {
        goldPatch->Apply(); // applies patch
    }
    else {
        goldPatch->Reset(); // resets patch
    }
    int aVal = settings["kVal"]; // accessing an int from the plist
    float floatVal = settings["kFloat"]; // accessing a float from the plist
    xpHook.Apply(); // applies hook
    xpHook.Reset(); // resets hook
}

Building Liberation

Liberation currently isn't really built for self building. That said it should still be possible for you to build it yourself. (Please note you need a Mac with xcode and cmake installed)

To build liberation, clone this repo and cd to it, then run these commands:

./liberation setup

./liberation build

When built, there should be a libLiberation.a file in the /lib folder. Just place this in your theos lib folder to use.

License

//Copyright (c) 2016, Razzile

//Permission to use, copy, modify, and/or distribute this software for any purpose
//with or without fee is hereby granted, provided that the above copyright notice
//and this permission notice appear in all copies.

//THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
//REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND
//FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
//INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS
//OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
//TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF
//THIS SOFTWARE.

liberation's People

Contributors

razzile avatar alcatraz0890 avatar naville avatar

Watchers

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