Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7939511
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T23:07:20+00:00 2026-06-03T23:07:20+00:00

I have a programm, which load library test.dll, this library use ws2_32.dll to create

  • 0

I have a programm, which load library test.dll, this library use ws2_32.dll to create socket and send/receive packets. I can inject my C++ library to this process, but dont know how to intecept test.dll calls of functions “socket”, “accept” for example. Can anybody help me with this matter?
Thanks!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-03T23:07:22+00:00Added an answer on June 3, 2026 at 11:07 pm

    You need to Hook the accept function.
    You can do this by using libraries e.g. MS Detours (earlier Versions are free you could use Version 1.5, just google it).
    Call

    DWORD a=DetourFindFunction("Ws2_32.dll","accept")
    

    it will give you the Pointer to the accept function.
    Then you can detour it by calling

    DetourFunction(a,&Yourfunction)
    

    .

    DetourFunction returns the new Pointer to “accept”, so make sure to call it at the end of “YourFunction” to make sure the programm does not crash.

    Alternatively you can redirect the function by yourself by using Inlineassembler. This is far more complicated of course.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a delphi programm which send record: type TMyNetworkPckg = record za: byte;
My programm successfully load a library (dlopen(..., RTLD_GLOBAL | RTLD_NOW);). Inside library I have
Consider we have a dynamic library ( HelloWorld.dll ) which is compiled with Microsoft
I have a program which references a DLL. Code in this DLL gets the
I have a program which does a system call: latex somefile.latex This runs ok,
I have a ASP.NET (C#) web page which utilizes a VB class library. The
I have some code that references an outside DLL which in production will be
Hi I have a C Dll which will interact with a cobol application. we
I have a program written in C++ which uses dlopen to load a dynamic
I want to load this Class library : namespace ClassLibrary1 { public class Class1

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.