Jump to content
Sign in to follow this  
Jelly

Hooking guide

Recommended Posts

Thread moved to 'Questions & Help' section. 


Share this post


Link to post
Share on other sites

Couple hooking that I know:
First (hooking a fishing pole):

  • buy a fishing pole
  • buy fishing lines
  • buy a hook
  • tie hook to fishing lines

Second (hooking up with a girl):

  • find a girl you like
  • impress her

Third (hooking in lua):

I assume this is the one you're looking for.
lets begin by saying functions in LUA does not need a name.


a)
function say(str)
    print(str)
end

say("Hello World")

is the same as: b)
say = function(str)
    print(str)
end
say("Hello World)

is also the same as: c)
(function(str)
    print(str)
end)("Hello World")

when we are hooking, it is essential that functions have a "name" (like a and b)
By using this mechanism of assigning functions to variable/name, we are able to hook very easily in LUA.

oldSay = Say -- this assigns the Say function to oldSay


Say = function(str) -- this is the new Say function
    print("NEW")
    oldSay(str) -- but we are also calling the old say, Therefore "hooking"
end

Not really a guide, but a simple explanation.

Fourth (hooking exe):

  • Know what you want to change in exe (maybe an instruction or hardcoded value)
  • Find location where instructions does not exist and insert your new codes
  • Find the location of instructions you want to change via breakpoints, jump address to your new code
  • jump back to the ending of the original codes
  • Like 2

kong.png

a2.png

Share this post


Link to post
Share on other sites

@xtc hahah thx man a detailed guide of different hookings

 

I was wondering about the hooking function (hook.lua) that is made by MaTT (i think?)

 

why do ppl do it? what is the purpose?

 

thx

 

also another thing i found is called Serialize

 

i hope to know what both of them are and what they are for :D

Edited by Jelly

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this  

×
×
  • Create New...