From 37c2f93383187f10470fcb9a2c78091332eb47c8 Mon Sep 17 00:00:00 2001 From: cocay Date: Wed, 10 Jan 2024 16:17:40 +0700 Subject: [PATCH] Update objc.go: fix shellcode offset --- macho-go/pkg/ios/macho/objc.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/macho-go/pkg/ios/macho/objc.go b/macho-go/pkg/ios/macho/objc.go index ec01d8d..d240514 100644 --- a/macho-go/pkg/ios/macho/objc.go +++ b/macho-go/pkg/ios/macho/objc.go @@ -325,7 +325,7 @@ func (mc *MachoContext) ReworkForObjc() { } } - encode_movz((data_end - text_start) + (shellcode_size - len(shellcode_start))) + encode_movz((data_end - text_start) + (shellcode_size - 7)) shellcode_offset = text_start - shellcode_size shellcode_bytes := append(shellcode_start, offset...)