Author |
Message |
Briggs
|
Posted: Tue Mar 10, 2009 8:17 pm Post subject: How to throw a BSOD on a C++ program? |
|
|
I'm trying to make a simple (note, VERY simple) security program (that's pretty useless besides just requiring a password to access the folder normally) that captures the whole screen and requires a password.
A part of this program is that if the user presses the Control button (either to Control-C or to Control-Alt-Delete out of the program), presses the Windows button (for the same reason), or uses up all 4 guesses, the program throws a BSOD and immediately crashes and shuts down the whole computer. But, I have no idea how to implement the BSOD. Does anybody have any ideas? (Other than just not to implement it... >_>) |
|
|
|
|
|
Sponsor Sponsor
|
|
|
rdrake
|
Posted: Tue Mar 10, 2009 8:26 pm Post subject: RE:How to throw a BSOD on a C++ program? |
|
|
They're usually produced by hardware errors. So write a poor driver. Better yet, allocate a ton of memory without freeing it and the user will be forced to reboot. |
|
|
|
|
|
Tony
|
Posted: Tue Mar 10, 2009 8:54 pm Post subject: RE:How to throw a BSOD on a C++ program? |
|
|
kernel panic! Any internal error, from which the system doesn't know how to recover. As rdrake says -- hardware failure is likely the easiest way to go.
I don't think that taking up a lot of memory will throw the system into a panic; maybe get it locked up at best. Definitely slow things down though. |
Tony's programming blog. DWITE - a programming contest. |
|
|
|
|
ecookman
|
Posted: Tue Mar 10, 2009 9:04 pm Post subject: RE:How to throw a BSOD on a C++ program? |
|
|
have the window go full screen?
set a blue background and put the text... no clue what language this is, but it might help...and could someone tell me what the language is lol so i can compile it
http://www.rohitab.com/discuss/index.php?showtopic=30270 |
|
|
|
|
|
md
|
Posted: Tue Mar 10, 2009 9:42 pm Post subject: RE:How to throw a BSOD on a C++ program? |
|
|
Crashing a computer is generally a bad thing... especially since if you've actually managed to lock the screen (ha!) then you can just execulte "shutdown -h" in the background.
'Course actually locking the screen is the first step and it's not easy. |
|
|
|
|
|
rdrake
|
Posted: Wed Mar 11, 2009 1:19 am Post subject: Re: RE:How to throw a BSOD on a C++ program? |
|
|
Tony @ Tue Mar 10, 2009 8:54 pm wrote: I don't think that taking up a lot of memory will throw the system into a panic; maybe get it locked up at best. Definitely slow things down though. That's the idea .
ecookman @ Tue Mar 10, 2009 9:04 pm wrote: no clue what language this is, but it might help
The site you linked to wrote: Fake Bsod - Gui - C, Fake blue screen of death Just a hunch, but I think it might be C. |
|
|
|
|
|
ecookman
|
Posted: Wed Mar 11, 2009 8:20 am Post subject: RE:How to throw a BSOD on a C++ program? |
|
|
i thought so too, but i wanted to "ask and expert" |
|
|
|
|
|
Dan
|
Posted: Wed Mar 11, 2009 12:07 pm Post subject: RE:How to throw a BSOD on a C++ program? |
|
|
I have made programs that try to alocate as much memoery as posible to test the DWITE judge and in all my tests it has never crashed the computer (tho these where done in a windows envoriment so other operating systems could be diffrent).
What would happen is the program would use up any RAM that was not in use and the page file and then either the program it's self would crash or windows would pop up a warning saying there is not enought memeory left and recomend that you close some programs. In the first case if the program crashs and it's alocation of the memoery is realsed and everything goese back to noraml in a few miniutes, in the second case you can't realy open any new programs but the operating system is still some what resposeive and you just need to kill the procese that is using up the memory and it goes back to noraml. (Also in some cases i blive windows will kill the process for you.)
I think the best option is what md recomend where you shutdown the computer.
However i should note that the most secure thing to do would be to encrypt the data in the folder with a strong cyhiper. Even if your program works the data could still be read by other means and other programs (or even by just reading the hard drive from a diffrent computer or operating system booted from a CD). |
Computer Science Canada
Help with programming in C, C++, Java, PHP, Ruby, Turing, VB and more! |
|
|
|
|
Sponsor Sponsor
|
|
|
Briggs
|
Posted: Wed Mar 11, 2009 4:37 pm Post subject: RE:How to throw a BSOD on a C++ program? |
|
|
Hardware failure, huh...
It's not even a real security program, and actually, the idea comes from Cyril. (He made it first, but I was trying to go a step further and cause a fatal error [BSOD] to shutdown the computer instead of running a DOS shutdown and allowing the user to possibly cancel it.)
@ecookman: I mean a real BSOD. One that's caused by a kernel failure.
@rdrake: Well, I can't really write a driver, though... XD
@md: I agree, crashing a computer is a bad thing. But it's a bad thing that happens to "protect" the data. And the way I "locked" the screen was using a cheap fullscreen DOS program. If the user then tries to Ctrl-C, Ctrl-Alt-Del or Windows key out of the window, the system shuts down anyway.
@Dan: I don't know how write an encryption program...!
But thanks for all your help, even if I don't know how to cause a hardware failure. |
|
|
|
|
|
Tony
|
Posted: Wed Mar 11, 2009 5:08 pm Post subject: Re: RE:How to throw a BSOD on a C++ program? |
|
|
Briggs @ Wed Mar 11, 2009 4:37 pm wrote: @Dan: I don't know how write an encryption program...!
So then why would I want to use your "BSOD" program to open files, instead of... let say Notepad? |
Tony's programming blog. DWITE - a programming contest. |
|
|
|
|
Insectoid
|
Posted: Wed Mar 11, 2009 5:41 pm Post subject: RE:How to throw a BSOD on a C++ program? |
|
|
Quote:
running a DOS shutdown and allowing the user to possibly cancel it
add -t 00 and they can't cancel it, unless they have the cancel command (shutdown -i?) looping in the background. |
|
|
|
|
|
md
|
Posted: Wed Mar 11, 2009 8:04 pm Post subject: RE:How to throw a BSOD on a C++ program? |
|
|
I'm just gonna lock this on the basis that it's a stupid idea that will neither turn out well nor end with any constuctive help. If you do manage to find a way to BSOD windows then that means there is a bug in windows, which you can expect to be fixed.
If you want to lock the screen, write a screensaver. |
|
|
|
|
|
|