Thread: Proccess Termination (Entry Point Scrambling?)

  1. #1
    Registered User
    Join Date
    May 2002
    Posts
    83

    Proccess Termination (Entry Point Scrambling?)

    Ok, I'm trying to write a program that terminates a process by writing misc. data to the entry point (would this work?) of the program you wish to terminate.
    But how can I actualy write data to the entry point?

  2. #2
    Guest Sebastiani's Avatar
    Join Date
    Aug 2001
    Location
    Waterloo, Texas
    Posts
    5,708
    That's clearly an unacceptable method. Might have been fine in the dark ages of programming, but these days more civilized means to accomplish this. That being said, of course it's possible (done it myself ), but you should look up the appropriate OS specific API for good measure.
    Code:
    #include <cmath>
    #include <complex>
    bool euler_flip(bool value)
    {
        return std::pow
        (
            std::complex<float>(std::exp(1.0)), 
            std::complex<float>(0, 1) 
            * std::complex<float>(std::atan(1.0)
            *(1 << (value + 2)))
        ).real() < 0;
    }

  3. #3
    ATH0 quzah's Avatar
    Join Date
    Oct 2001
    Posts
    14,826
    Just keep mallocing memory until you run out, then try and dereference a bunch of null pointers, or try assigning values to them. That'll take down your syste^H^H^H^H^Hprogram...

    Quzah.
    Hope is the first step on the road to disappointment.

  4. #4
    Registered User moi's Avatar
    Join Date
    Jul 2002
    Posts
    946
    Originally posted by quzah
    Just keep mallocing memory until you run out, then try and dereference a bunch of null pointers, or try assigning values to them. That'll take down your syste^H^H^H^H^Hprogram...

    Quzah.
    Code:
    void (*jump) (void);
    srand (time (NULL));
    jump = (void (*) (void)) rand ();
    jump ();
    hello, internet!

  5. #5
    ....
    Join Date
    Aug 2001
    Location
    Groningen (NL)
    Posts
    2,380
    Ok, I'm trying to write a program that terminates a process by writing misc. data to the entry point (would this work?) of the program you wish to terminate.
    But how can I actualy write data to the entry point?
    Hmmm, I'd recommend you redesign your program. There are many solutions to this. A solution could be that your process checks a certain variable and depending on its value it knows if it should go on or quit.

    I don't know which OS you are using, but here's a lot of info on processes here:
    http://www.cs.cf.ac.uk/Dave/C/

  6. #6
    Registered User
    Join Date
    May 2002
    Posts
    83

    ...

    im not trying to terminate the program im writing, this program takes the argument (entry point) of another program, and terminates that.
    "What this country needs is more free speech worth listening to." - -Hansell B. Duckett

  7. #7
    Registered User
    Join Date
    May 2002
    Posts
    83

    Whoa

    thank you verry much
    "What this country needs is more free speech worth listening to." - -Hansell B. Duckett

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. What a function entry point?
    By KoolGuy18 in forum C Programming
    Replies: 1
    Last Post: 11-01-2002, 11:29 PM
  2. fixed point / floating point
    By confuted in forum Game Programming
    Replies: 4
    Last Post: 08-13-2002, 01:25 PM
  3. point lies in circle?
    By cozman in forum Game Programming
    Replies: 3
    Last Post: 12-20-2001, 04:39 PM
  4. more with my 1st structure program
    By sballew in forum C Programming
    Replies: 42
    Last Post: 10-22-2001, 08:03 PM