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

  • Home
  • SEARCH
  • 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 9147113
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T10:54:33+00:00 2026-06-17T10:54:33+00:00

Having used to debug with tools like gdb etc, I have little knowledge about

  • 0

Having used to debug with tools like gdb etc, I have little knowledge about they get implemented. I am trying to implement an anti debugging technique in my program but having very little knowledge about debugging, I need some help. I have come across following code from http://www.julioauto.com/rants/anti_ptrace.htm

void anti_ptrace(void)
{
    pid_t child;

    if(getenv("LD_PRELOAD"))
        while(1);

    child = fork();
    if (child)
        wait(NULL);
    else 
    {
        pid_t parent = getppid();

        if (ptrace(PTRACE_ATTACH, parent, 0, 0) < 0)
            while(1);

        sleep(1);
        ptrace(PTRACE_DETACH, parent, 0, 0);
        exit(0);
    }
}

I want to have expert opinion of you gurus about how successful the above code will be and what are Pros and cons?

Any help would be appreciated.

  • 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-17T10:54:34+00:00Added an answer on June 17, 2026 at 10:54 am

    The only way you can actually protect your algorithms from debugging or decompiling is to restrict access to their binaries – by running them on remote machine and accessing via TCP/IP. Any local solution will eventually fail in hands of determined cracker.

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

Sidebar

Related Questions

Having used storyboards for a while now I have found them extremely useful however,
Having used PHP GD for some time I have decided to move to Imagemagick.
I'm new to the Oracle Platform (having primarily used MySQL, with a little Postgres
I've just started using Dapper for a project, having mostly used ORMs like NHibernate
trying to get my first little PHP script to connect to a local mySql
Having used optional parameters in a few classes here and there, I'm starting to
I just setup AnkhSVN after having used TFS till now What in AnkhSVN is
Having never used awk before on Linux I am attempting to understand how it
I am used to having static methods in the App_Code folder, this folder is
Am having a batch file used to update certain files. However when i try

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.