Winsock hooking-VBForums
Results 1 to 10 of 10

Thread: Winsock hooking

  1. #1

    Thread Starter
    Addicted Member cc2^^'s Avatar
    Join Date
    Apr 2008
    Location
    Right behind you.
    Posts
    165

    Winsock hooking

    Well I need to make a winsock hook. I want to send packets from the game client itself, instead of connecting to the server as my own client and sending packets. Any clue how to do this?
    Last edited by cc2^^; Jul 27th, 2010 at 08:57 AM. Reason: unmarked it resolved
    I think I am, therefore, I am. I think.

  2. #2

    Thread Starter
    Addicted Member cc2^^'s Avatar
    Join Date
    Apr 2008
    Location
    Right behind you.
    Posts
    165

    Re: Winsock hooking

    anyone?
    I think I am, therefore, I am. I think.

  3. #3
    Hyperactive Member
    Join Date
    Jul 2009
    Posts
    489

    Re: Winsock hooking

    i don't understand exactly what you mean.
    you can easly use winsock API directly to send packets,
    that needs a little hook.
    is that what you need ?

  4. #4

    Thread Starter
    Addicted Member cc2^^'s Avatar
    Join Date
    Apr 2008
    Location
    Right behind you.
    Posts
    165

    Re: Winsock hooking

    Quote Originally Posted by whatsup View Post
    i don't understand exactly what you mean.
    you can easly use winsock API directly to send packets,
    that needs a little hook.
    is that what you need ?
    I meant sending packets to the server through another client that i have not made, so the server will think its that client that sent the packets. Sorta like this:

    Hook|Client --> Server

    the hook makes the client send packets on my command. Even if the client is firefox, a game or whatever.

    I hope i am using the right word 'hook'. Maybe this is called something else...
    I think I am, therefore, I am. I think.

  5. #5
    Hyperactive Member
    Join Date
    Jul 2009
    Posts
    489

    Re: Winsock hooking

    [QUOTE=cc2^^;3851544]
    I meant sending packets to the server through another client that i have not made
    aha, now i understand. yes i think hook the server (or maybe the client) can help you.
    i didn't have the time yet, to learn this stuff,
    but i saw some good working examples, in this site.
    make a search for hook, hook control.

  6. #6
    Hyperactive Member
    Join Date
    Jul 2009
    Posts
    489

    Re: [RESOLVED] Winsock hooking

    cc2 if this was resolved, i (and probably other), will be glad to know the solution,
    at least the direction.
    thanks.

  7. #7

    Thread Starter
    Addicted Member cc2^^'s Avatar
    Join Date
    Apr 2008
    Location
    Right behind you.
    Posts
    165

    Re: [RESOLVED] Winsock hooking

    Quote Originally Posted by whatsup View Post
    cc2 if this was resolved, i (and probably other), will be glad to know the solution,
    at least the direction.
    thanks.
    I accidentally marked this thread as resolved when i thought i found the answer in a thread that showed how to hook winsock, but it could only hook on itself and no other process.

    So it's still unsolved.

    EDIT: Also is there a way to undo this?
    Last edited by cc2^^; Jul 26th, 2010 at 06:12 PM.
    I think I am, therefore, I am. I think.

  8. #8
    Hyperactive Member
    Join Date
    Jul 2009
    Posts
    489

    Re: [RESOLVED] Winsock hooking

    here is a good example of hook,
    http://www.vbforums.com/showthread.p...t=hook+control
    if something going wrong, this is a working example that i fixed
    http://www.vbforums.com/showthread.php?t=616057#16

    about the undo, yes you can, i did it once, but i don't remember how

    EDIT: i found it.
    edit the first post, go advanced, and you can edit the header and erase the word resolved

  9. #9

    Thread Starter
    Addicted Member cc2^^'s Avatar
    Join Date
    Apr 2008
    Location
    Right behind you.
    Posts
    165

    Re: [RESOLVED] Winsock hooking

    Quote Originally Posted by whatsup View Post
    here is a good example of hook,
    http://www.vbforums.com/showthread.p...t=hook+control
    if something going wrong, this is a working example that i fixed
    http://www.vbforums.com/showthread.php?t=616057#16

    about the undo, yes you can, i did it once, but i don't remember how

    EDIT: i found it.
    edit the first post, go advanced, and you can edit the header and erase the word resolved
    Thanks for the thread you showed me!
    I read through it and tested the hooking example on notepad and i think i understand it alot better now

    But i still wonder how to make it hook an app with Winsock, i tried changing the ParentCaption to the name of a program that uses winsock. The error i get then is You must set handle before setting hook.

    Maybe the ChildClassName and ChildCaption should also be changed?
    I think I am, therefore, I am. I think.

  10. #10
    Hyperactive Member
    Join Date
    Jul 2009
    Posts
    489

    Re: Winsock hooking

    as i said i didn't have the time to test this yet, sorry.
    what i think, that you have a windowproc function
    that you receive messages from windows.
    you examine the message id, if it's a socket message, then you process it,
    if no, you send the message to the next process on the hook.

    only a thought,i didn't test this at all yet.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Featured


Click Here to Expand Forum to Full Width

Survey posted by VBForums.