First of all I would like to say this isn't technically a virus, this is something I developed to prank my freind who is a big fan of the TV comedy "little britain", me being me I thought it would be halariouse to create an application that goes in full screen mode, displays the receptionist, and every time he presses a button you would hear the sound "computer says no" in that funny moron receptionists voice, so that is what I did and thought I would share it, it's important to note this was just a practical joke program and isn't meliciouse, you just press Alt + F4 to close the application, I have inluded the source code (C++) and also a seperate file with the exe and resources for the application, the application was coded for Win32 OS and uses DirectX device (but can be easily edited for other OS's), it uses the Irrlicht and IrrKlang engine(s), it isn't my best coding but I didn't exactly take much care with it as it isn't exactly a seriouse project, so have fun.
Download:
Download the source code, exe and resouces HERE
source
Code: Select all
//Engine(s) Includes--
#include <irrlicht.h>
#include <irrKlang.h>
//Other includes
#pragma comment(lib, "Irrlicht.lib") //link with irrlicht.dll
#pragma comment(lib, "irrKlang.lib") // link with irrKlang.dll
//use many namespaces as I'm being lazy
using namespace std;
using namespace irr;
using namespace irrklang;
using namespace core;
using namespace scene;
using namespace video;
using namespace gui;
//remove console window
#pragma comment(linker, "/subsystem:windows /ENTRY:mainCRTStartup")
//!events class
class MyEventReceiver : public IEventReceiver
{
public:
virtual bool OnEvent(const SEvent& event)
{
if (event.EventType == irr::EET_KEY_INPUT_EVENT && !event.KeyInput.PressedDown)
{
ISoundEngine* engine = createIrrKlangDevice();
switch (event.KeyInput.Key)
{
case irr::KEY_ESCAPE:
{
engine->play2D("no.wav");
return true;
}
default: engine->play2D("no.wav");//to be applied always by default
break;
}
}
return false;
}
};
int main()
{
//create a device using preferential parameters
IrrlichtDevice* device = irr::createDevice( irr::video::EDT_DIRECT3D9,
irr::core::dimension2d<irr::s32>(800, 600), 32, true ,true,false,0);
//create irrklang engine init
ISoundEngine* engine = createIrrKlangDevice();
//get driver
IVideoDriver* driver = device->getVideoDriver();
//get scene manager
ISceneManager* smgr = device->getSceneManager();
//get GUI environment
IGUIEnvironment* env = device->getGUIEnvironment();
//check irrlicht device and klang engine
if (!device)
{
cout<<"Could not create device for Irrlicht engine\n";
return -1;
}
if (!engine)
{
cout<<"Could not initialize IrrKlang engine\n";
return -1;
}
//create image
ITexture* image = driver->getTexture("no.jpg");
//render image
env->addImage(image,position2d<s32>(0,0));
//create event reciever
MyEventReceiver receiver;
//use reciever
device->setEventReceiver(&receiver);
device->getCursorControl()->setVisible(false);
//________Main rendering loop_______//
while(device->run() && driver)
{
driver->beginScene(true, true, SColor(255,120,120,120));
smgr->drawAll();
env->drawAll();
driver->endScene();
}
device->drop();
engine->drop();
return 0;
}