Skip to content

Instantly share code, notes, and snippets.

@arthurdapaz
Last active January 3, 2018 16:30
Show Gist options
  • Save arthurdapaz/f6a1de0d347cbf9f6ceee89e11a5aacd to your computer and use it in GitHub Desktop.
Save arthurdapaz/f6a1de0d347cbf9f6ceee89e11a5aacd to your computer and use it in GitHub Desktop.
Header for MemPatcher
/*
Runtime MemPatcher - by Arthur da Paz
Completely based on the famous writeData.h
created by Razzile & HackJack for iOSGods.com
Copyright 2016 Arthur da Paz, AP Security Inc
This code is licensed under the GTFC LICENSE, which means
██████╗ ██╗██╗ ██╗███████╗ ████████╗██╗ ██╗███████╗
██╔════╝ ██║██║ ██║██╔════╝ ╚══██╔══╝██║ ██║██╔════╝
██║ ███╗██║██║ ██║█████╗ ██║ ███████║█████╗
██║ ██║██║╚██╗ ██╔╝██╔══╝ ██║ ██╔══██║██╔══╝
╚██████╔╝██║ ╚████╔╝ ███████╗ ██║ ██║ ██║███████╗
╚═════╝ ╚═╝ ╚═══╝ ╚══════╝ ╚═╝ ╚═╝ ╚═╝╚══════╝
███████╗██╗ ██╗ ██████╗██╗ ██╗██╗███╗ ██╗ ██████╗
██╔════╝██║ ██║██╔════╝██║ ██╔╝██║████╗ ██║██╔════╝
█████╗ ██║ ██║██║ █████╔╝ ██║██╔██╗ ██║██║ ███╗
██╔══╝ ██║ ██║██║ ██╔═██╗ ██║██║╚██╗██║██║ ██║
██║ ╚██████╔╝╚██████╗██║ ██╗██║██║ ╚████║╚██████╔╝
╚═╝ ╚═════╝ ╚═════╝╚═╝ ╚═╝╚═╝╚═╝ ╚═══╝ ╚═════╝
██████╗██████╗ ███████╗██████╗ ██╗████████╗███████╗
██╔════╝██╔══██╗██╔════╝██╔══██╗██║╚══██╔══╝██╔════╝
██║ ██████╔╝█████╗ ██║ ██║██║ ██║ ███████╗
██║ ██╔══██╗██╔══╝ ██║ ██║██║ ██║ ╚════██║
╚██████╗██║ ██║███████╗██████╔╝██║ ██║ ███████║
╚═════╝╚═╝ ╚═╝╚══════╝╚═════╝ ╚═╝ ╚═╝ ╚══════╝
In this case, credits go to:
- Razzile
- HackJack
- DiDA (iOSGods master)
- AP (arthurdapaz)
PS: Why I did this? --> Great hacks require great readability
*/
#import <Foundation/Foundation.h>
#import <objc/runtime.h>
#import <mach-o/dyld.h>
#import <mach/mach.h>
@interface MemPatcher : NSObject
+ (instancetype) patch:(vm_object_offset_t)addr data:(uint)data;
- (bool) apply;
- (bool) reset;
+ (vm_object_offset_t) calculate:(vm_object_offset_t)offset;
@end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment