A Self Destructing Program in C
Submitted by Srikanth on Saturday, 1 March 200816 Comments
This program will destroy itself upon execution. The program will cause the .exe file to be deleted upon execution. That is this program is capable of destroying itself upon execution. Here is the code
#include<stdio.h>
#include<conio.h>
#include<dos.h>
void main()
{
printf(“This program will destroy itself if u press any key!!!\n”);
getch();
remove(_argv[0]);/*array of pointers to command line arguments*/
}
#include<conio.h>
#include<dos.h>
void main()
{
printf(“This program will destroy itself if u press any key!!!\n”);
getch();
remove(_argv[0]);/*array of pointers to command line arguments*/
}
HOW TO COMPILE ?
Load the source code to the compiler and compile (press Alt-F9) and then press F9. This will generate the .exe file in the current directory (Bin directory). Execute this .exe file it will destroy itself upon execution.
Popularity: 2% [?]
Visitors who read this post, also read:
By using/following this site you agree to our Legal Disclaimer


i donot understand remove(_argv[0])
Whenever we run any program the element _argv[0] (array of ptrs to command line arguments) contains the name of the program itself.For eg: If we are running a program(.exe file) whose name is “sample.exe” then the _argv[0] would contain this name.That is why we are passing _argv[0](nothing but the name of the program) as an argument to remove() function which will delete itsef eventually
hi,
i am bharadwaj and i want to destroy orkut account with a simple program is there any posibility pls
check it
@ Bharadwaj
Are you joking? It’s not possible yaar…
i didn’t get it. do i need to copy and paste this code and save in any format . will i be runnig it later or wat?????? pls help me m confused
Pls reply ASAP
@ josh
Copy and paste the code to a notepad. Rename the extension from .txt to .C, now compile it to get an executable(.exe file). Now if you execute/run this file it’ll destroy itself upon execution.
hi frnd………from which website,i can free download jdk1.6.0_02????????
@ abhishek
You can download it from sun microsystem’s site… or search it on google.
Mr.srikanth….er!!!rather Mr. bardwaj it is possible to delete orkut account u wish after having access…this cat be done easily by making a trojan …bypassing firewall….stealing data frm secure connection…not easy man…keep learning…and ur space filler…its beaten…kaspersky don’t let it execute if self defence is enabled…one thing more…a virus must be self replicating thus urs is only a mere pro….for more info ….read von nuemans self replication….keep it up man….njoy life
nice Shot SRIKANTH……io like ur work.i am beginer.and i m very Glad that u r helping others.Keep It up.my Prayers r with u.
hello srikanth….
would u plz submit a c coading that will delete a file(any extention) in my hard disk…
thnx…
Use of a program like this?
Like your site its self destructive
You’ve done a great job dude..
whats command line argument ??
srikanth
Nice one….
stdio.h is the header file in the above program
Leave your response!
EMAIL SECURITY »
What to Do When Your Email Account is Hacked?
How to Recover Hacked Email Accounts?
It can be a real nightmare if someone hacks and takes control of your email account as it may contain confidential information like bank logins, credit card details and other sensitive data. …
HOW-TO GUIDES »
Cell Phone Lookup: How to Do a Reverse Cell Phone Lookup
A Reverse Cell Phone Lookup is simply a process of finding someone’s personal details such as name, age, address and related information by using their cell phone number. At times it becomes necessary for us to start investigating …
INTERNET SECURITY »
How to Detect Anonymous IP Addresses
As the fraudsters are now becoming more sophisticated in bypassing the Geo-location controls by using proxies (Anonymous IPs) to spoof their IP address, it has become very much necessary to come up with a means …
NETWORK HACKS »
How to Hack an Ethernet ADSL Router
Almost half of the Internet users across the globe use ADSL routers/modems to connect to the Internet however, most of them are unaware of the fact that it has a serious vulnerability which can easily be exploited even by a …
VIRUS CREATION »
How to Test the Working of your Antivirus – EICAR Test
Have you ever wondered how to test your Antivirus software to ensure it’s proper working? Well here is a quick and easy way to test your antivirus. The process is called EICAR test which will …
Categories
Blogroll
Recent Comments
Most Commented
Most Popular
Log In | Entries (RSS) | Comments (RSS) | Sitemap