Proccess Termination (Entry Point Scrambling?)

This is a discussion on Proccess Termination (Entry Point Scrambling?) within the C Programming forums, part of the General Programming Boards category; Ok, I'm trying to write a program that terminates a process by writing misc. data to the entry point (would ...

  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,655
    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.

  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
    moi
    moi is offline
    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,386
    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, 10:29 PM
  2. fixed point / floating point
    By confuted in forum Game Programming
    Replies: 4
    Last Post: 08-13-2002, 01:25 PM
  3. Abstract class problem
    By VanJay011379 in forum C++ Programming
    Replies: 9
    Last Post: 07-31-2002, 01:30 PM
  4. point lies in circle?
    By cozman in forum Game Programming
    Replies: 3
    Last Post: 12-20-2001, 03:39 PM
  5. more with my 1st structure program
    By sballew in forum C Programming
    Replies: 42
    Last Post: 10-22-2001, 08:03 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21