x64 ws2_32.dll function hooks c++ menu

Shout-Out

User Tag List

Results 1 to 1 of 1
  1. #1
    BitHacker's Avatar Master Sergeant
    Reputation
    13
    Join Date
    May 2012
    Posts
    114
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    x64 ws2_32.dll function hooks c++

    Thought I share these in-case anyone wants them too. Here are the send and recv functions:
    (Its up to you to make sure the addresses are correct)

    Updated:

    Code:
    // -- Start of Hooks ---
    
    // --- SEND FUNCTIONS ---
    // The send function sends data on a connected socket.
    typedef int (*Send_t)( SOCKET s, const char *buf, int len, int flags );
    Send_t oSend = (Send_t)0x000007fefdb98000;
    int hkSend( SOCKET s, const char *buf, int len, int flags );
    
    // The WSASend function sends data on a connected socket.
    typedef int (*WSASend_t)( SOCKET s, LPWSABUF lpBuffers, DWORD dwBufferCount, LPDWORD lpNumberOfBytesSent, DWORD dwFlags, LPWSAOVERLAPPED lpOverlapped, LPWSAOVERLAPPED_COMPLETION_ROUTINE lpCompletionRoutine );
    WSASend_t oWSASend = (WSASend_t)0x000007fefdb913b0;
    int hkWSASend( SOCKET s, LPWSABUF lpBuffers, DWORD dwBufferCount, LPDWORD lpNumberOfBytesSent, DWORD dwFlags, LPWSAOVERLAPPED lpOverlapped, LPWSAOVERLAPPED_COMPLETION_ROUTINE lpCompletionRoutine );
    
    // The WSASendTo function sends data to a specific destination, using overlapped I/O where applicable.
    typedef int (*WSASendTo_t)( SOCKET s, LPWSABUF lpBuffers, DWORD dwBufferCount, LPDWORD lpNumberOfBytesSent, DWORD dwFlags, const struct sockaddr *lpTo, int iToLen, LPWSAOVERLAPPED lpOverlapped, LPWSAOVERLAPPED_COMPLETION_ROUTINE lpCompletionRoutine );
    WSASendTo_t oWSASendTo = (WSASendTo_t)0x000007fefdb9ed50;
    int hkWSASendTo( SOCKET s, LPWSABUF lpBuffers, DWORD dwBufferCount, LPDWORD lpNumberOfBytesSent, DWORD dwFlags, const struct sockaddr *lpTo, int iToLen, LPWSAOVERLAPPED lpOverlapped, LPWSAOVERLAPPED_COMPLETION_ROUTINE lpCompletionRoutine );
    // --- END OF SEND FUNCTIONS ---
    
    
    // --- RECIEVE FUNCTIONS ----
    // The recv function receives data from a connected socket or a bound connectionless socket.
    typedef int (*Recv_t)( SOCKET s, char *buf, int len, int flags );
    Recv_t oRecv = (Recv_t)0x000007fefdb9df40;
    int hkRecv( SOCKET s, char *buf, int len, int flags );
    
    // The recvfrom function receives a datagram and stores the source address.
    typedef int (*Recvfrom_t)( SOCKET s, char *buf, int len, int flags, struct sockaddr *from, int *fromlen );
    Recvfrom_t oRecvfrom = (Recvfrom_t)0x000007fefdb9eb90;
    int hkRecvfrom( SOCKET s, char *buf, int len, int flags, struct sockaddr *from, int *fromlen );
    
    // The WSARecvFrom function receives a datagram and stores the source address.
    typedef int (*WSARecvFrom_t)( SOCKET s, LPWSABUF lpBuffers, DWORD dwBufferCount, LPDWORD lpNumberOfBytesRecvd, LPDWORD lpFlags, struct sockaddr *lpFrom, LPINT lpFromlen, LPWSAOVERLAPPED lpOverlapped, LPWSAOVERLAPPED_COMPLETION_ROUTINE lpCompletionRoutine );
    WSARecvFrom_t oWSARecvFrom = (WSARecvFrom_t)0x000007fefdbbe6c0;
    int hkWSARecvFrom( SOCKET s, LPWSABUF lpBuffers, DWORD dwBufferCount, LPDWORD lpNumberOfBytesRecvd, LPDWORD lpFlags, struct sockaddr *lpFrom, LPINT lpFromlen, LPWSAOVERLAPPED lpOverlapped, LPWSAOVERLAPPED_COMPLETION_ROUTINE lpCompletionRoutine );
    // --- END RECIEVE FUNCTIONS ---
    
    //--- End of Hooks ---
    Last edited by BitHacker; 06-06-2012 at 04:27 PM.

    x64 ws2_32.dll function hooks c++

Similar Threads

  1. Replies: 8
    Last Post: 07-22-2013, 01:24 AM
  2. How to import my own dll function names into IDA
    By demonguy in forum WoW Memory Editing
    Replies: 13
    Last Post: 03-25-2013, 01:52 PM
  3. x64 Libraries used for hooking...???
    By BitHacker in forum Programming
    Replies: 0
    Last Post: 06-06-2012, 03:48 PM
  4. CEGUI - EndScene Hook - DLL Function Call
    By Orix in forum WoW Memory Editing
    Replies: 5
    Last Post: 02-12-2011, 03:51 PM
  5. View what API functions are hooked by Wow
    By barthen in forum WoW Memory Editing
    Replies: 8
    Last Post: 10-26-2008, 11:25 PM
All times are GMT -5. The time now is 12:21 AM. Powered by vBulletin® Version 4.2.3
Copyright © 2025 vBulletin Solutions, Inc. All rights reserved. User Alert System provided by Advanced User Tagging (Pro) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
Google Authenticator verification provided by Two-Factor Authentication (Free) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
Digital Point modules: Sphinx-based search