A Self Destructing Program in C
Submitted by Srikanth on Saturday, 1 March 200823 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% [?]
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
hi,Im just a 12th standard student.I am impressed of your blog.I want to know more about computers and the ways of hacking…just to prevent getting hacked.i want to know more about you.plz contact me.Suggest me for future studies.
I like ur posts@the author..Go ahead and give some real things..
You could add this to the end of the space eater program and get rid of the warnings and it would be a great security tool.
hey Srikanth, i’m a btech student of cse trade…..i knw c++ but only in therotical way. i lov programming…..
i need a way to learn how we communicate wid h\w using c n many more ,so want a bound of u pls contact me
i’ll wait 4 ur response
guide me Srikanth ………….
u’r luking interesting ……..
wow man nice program really..i will try this in my college systems :p
its a simple logic…dude
hmm its good
can u write the java program without main function and print a message on the screen
if it is possible please post the code in this blog
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 STUFFS WORK »
How Antivirus Software Works
Due to ever increasing threat from virus and other malicious programs, almost every computer today comes with a pre-installed antivirus software on it. In fact, an antivirus has become one of the most essential software package for every computer. Even though every one …
HOW-TO GUIDES »
How to Hide Data in Image, Audio & Video Files: Steganography
Ever wondered to know how to hide secret messages in images, audio and video files? Well, in this post I will take you through a concept called steganography using which, it is possible to hide your secret information …
INTERNET SECURITY »
How to Hide Data in Image, Audio & Video Files: Steganography
Ever wondered to know how to hide secret messages in images, audio and video files? Well, in this post I will take you through a concept called steganography using which, it is possible to hide your secret information …
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 …
Categories
Most Popular
Most Commented
Blogroll
Log In | Entries (RSS) | Comments (RSS) | Sitemap
© 2008-2011 GoHacking.Com. This content is copyrighted to Srikanth and may not be reproduced on other websites.