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?
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?
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; }
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.
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!
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.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?
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/
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
thank you verry much
"What this country needs is more free speech worth listening to." - -Hansell B. Duckett