Jump to content

H5GG Full Tutorial [Offset Patching + Hooking] for Non-Jailbroken/Jailbreak Devices !


129 posts in this topic

Recommended Posts

Posted
3 hours ago, 𓄼 . f v c k . 𓄹 said:

then the iPA is not rightly made. Re do Step 1

this is my h5frida-code-patch-test(non-jailbreak).js Script.
is there something wrong with it?

h5gg.require(7.9);
var h5frida=h5gg.loadPlugin("h5frida", "h5frida-15.1.24.dylib");
if(!h5frida) throw "Failed to load h5frida plugin";

function ActiveCodePatch(fpath, vaddr, bytes) {
    if(!h5frida.ActiveCodePatch(fpath, vaddr, bytes)) {
        var result = h5frida.ApplyCodePatch(fpath, vaddr, bytes);
        alert(fpath+":0x"+vaddr.toString(16)+"-修改失败!\n" + fpath+":0x"+vaddr.toString(16)+"-PatchFailed!\n" + result);return false;
    } return true;
}
function DeactiveCodePatch(fpath, vaddr, bytes) {
    return h5frida.DeactiveCodePatch(fpath, vaddr, bytes);
}

ActiveCodePatch("Frameworks/UnityFramework.framework/UnityFramework", 0x2XXXX62, "C0XXXD6");
ActiveCodePatch("Frameworks/UnityFramework.framework/UnityFramework", 0x259XXXD, "C0XXXD6");
ActiveCodePatch("Frameworks/UnityFramework.framework/UnityFramework", 0x25XXX56, "C00XXXD6");
ActiveCodePatch("Frameworks/UnityFramework.framework/UnityFramework", 0x25XXXX6, "C00XXXD6");

 

Posted
10 hours ago, Haidar_phantom said:

this is my h5frida-code-patch-test(non-jailbreak).js Script.
is there something wrong with it?

h5gg.require(7.9);
var h5frida=h5gg.loadPlugin("h5frida", "h5frida-15.1.24.dylib");
if(!h5frida) throw "Failed to load h5frida plugin";

function ActiveCodePatch(fpath, vaddr, bytes) {
    if(!h5frida.ActiveCodePatch(fpath, vaddr, bytes)) {
        var result = h5frida.ApplyCodePatch(fpath, vaddr, bytes);
        alert(fpath+":0x"+vaddr.toString(16)+"-修改失败!\n" + fpath+":0x"+vaddr.toString(16)+"-PatchFailed!\n" + result);return false;
    } return true;
}
function DeactiveCodePatch(fpath, vaddr, bytes) {
    return h5frida.DeactiveCodePatch(fpath, vaddr, bytes);
}

ActiveCodePatch("Frameworks/UnityFramework.framework/UnityFramework", 0x2XXXX62, "C0XXXD6");
ActiveCodePatch("Frameworks/UnityFramework.framework/UnityFramework", 0x259XXXD, "C0XXXD6");
ActiveCodePatch("Frameworks/UnityFramework.framework/UnityFramework", 0x25XXX56, "C00XXXD6");
ActiveCodePatch("Frameworks/UnityFramework.framework/UnityFramework", 0x25XXXX6, "C00XXXD6");

 

Are you using 2 times the same offset to patch ? 

Seems good with the code, but maybe you did something wrong with the ipa, and so it can’t load frida or frida gadget 

Posted (edited)
36 minutes ago, 𓄼 . f v c k . 𓄹 said:

Are you using 2 times the same offset to patch ? 

Seems good with the code, but maybe you did something wrong with the ipa, and so it can’t load frida or frida gadget 

no i fixed it, i was going wrong with the offsets.
do you know how to convert my code to html and load directly?
i want to test the option "Make Tweak" in H5gg

Updated by Haidar_phantom
Posted
22 minutes ago, Haidar_phantom said:

no i fixed it, i was going wrong with the offsets.
do you know how to convert my code to html and load directly?
i want to test the option "Make Tweak" in H5gg

i will post part 2 and there will be this. Once i have the time

  • Like 1

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
  • Create New...

Important Information

We would like to place cookies on your device to help make this website better. The website cannot give you the best user experience without cookies. You can accept or decline our cookies. You may also adjust your cookie settings. Privacy Policy - Guidelines