Ritesh’s Technical Blog

folder locker source code in c++

Posted on: September 21, 2008

I have created a program in C++ that will lock the folder here is the coding for
it
#include<process.h>
#include<iostream.h>
#include<fstream.h>
#include<conio.h>
void print();
void choice();
void main()
{
clrscr();
print();
cout<<“nnnnnnnn -Before proceeding read carefully the
readme.txt file.”;
cout<<“nn -On execution it will create files namely lock.bat &
unlock.bat.”;
cout<<“nnnnnnnnnnnnnnnttttTHANK YOU”;
cout<<“nnnnnnnnnnntttttttpress any key …”;
getch();
clrscr();
char pass[6];
print();
cout<<“nn Enter secret code :”;
abc:for(int i=1;i<=6;i++)
{
pass[i]=getch();
cout<<“*”;
}
getch();
for(i=1;i<=6;i++)
{
if(pass[1]==’R’ && pass[2]==’i’ && pass[3]==’t’ && pass[4]==’e’
&& pass[5]==’s’ && pass[6]==’H’)
{
clrscr();
char fold_name[20],ch;
print();
cout<<“nnn Enter the name of the folder you want to protect :
“;
cin.getline(fold_name,20);
char kk;
clrscr();
asd:print();
cout<<“nnn What do you want to do?”;
cout<<“nnnta> Lock Folder”;
cout<<“nntb> Unlock Folder”;
cout<<“nntc> Exit”;
cout<<“nnnnnn Enter your choice : “;
cin>>kk;
switch(kk)
{
case ‘a’:
case ‘A’:
{
qwe:clrscr();
print();
cout<<“nn In which special folder you want to convert your
folder:”;
choice();
cin>>ch;
switch(ch)
{
case ‘1’:
{
ofstream file;
file.open(“lock.bat”);
file<<“ren “<<fold_name<<” “<<fold_name<<“.{00022602-
0000-0000-C000-000000000046}ndel lock.bat”;
file.close();
} break;
case ‘2’:
{
ofstream file;
file.open(“lock.bat”);
file<<“ren “<<fold_name<<” “<<fold_name<<“.{0CD7A5C0-
9F37-11CE-AE65-08002B2E1262}ndel lock.bat”;
file.close();
} break;
case ‘3’:
{
ofstream file;
file.open(“lock.bat”);
file<<“ren “<<fold_name<<” “<<fold_name<<“.{0DF44EAAFF21-
4412-828E-260A8728E7F1}ndel lock.bat”;
file.close();
} break;
case ‘4’:
{
ofstream file;
file.open(“lock.bat”);
file<<“ren “<<fold_name<<” “<<fold_name<<“.{208D2C60-
3AEA-1069-A2D7-08002B30309D}ndel lock.bat”;
file.close();
} break;
case ‘5’:
{
ofstream file;
file.open(“lock.bat”);
file<<“ren “<<fold_name<<” “<<fold_name<<“.{20D04FE0-
3AEA-1069-A2D8-08002B30309D}ndel lock.bat”;
file.close();
} break;
case ‘6’:
{
ofstream file;
file.open(“lock.bat”);
file<<“ren “<<fold_name<<” “<<fold_name<<“.{645FF040-
5081-101B-9F08-00AA002F954E}ndel lock.bat”;
file.close();
} break;
case ‘7’:
{
ofstream file;
file.open(“lock.bat”);
file<<“ren “<<fold_name<<” “<<fold_name<<“.{6DFD7C5C-
2451-11d3-A299-00C04F8EF6AF}ndel lock.bat”;
file.close();
} break;
case ‘8’:
{
ofstream file;
file.open(“lock.bat”);
file<<“ren “<<fold_name<<” “<<fold_name<<“.{7007ACC7-
3202-11D1-AAD2-00805FC1270E}ndel lock.bat”;
file.close();
} break;
default :
{
cout<<“nn Invalid Choice”;
cout<<“nnnnnnntttttttpress any key …”;
getch();
clrscr();
goto qwe;
}
}//ch
}break;//case1
case ‘b’:
case ‘B’:
{
char ufold_name[20],ch1;
dfg:clrscr();
print();
cout<<“nn In which special folder you have converted your
folder:”;
choice();
cin>>ch1;
switch(ch1)
{
case ‘1’:
{
ofstream file;
file.open(“unlock.bat”);
file<<“ren “<<fold_name<<“.{00022602-0000-0000-C000-
000000000046}”<<” “<<fold_name<<“ndel unlock.bat”;
file.close();
} break;
case ‘2’:
{
ofstream file;
file.open(“unlock.bat”);
file<<“ren “<<fold_name<<“.{0CD7A5C0-9F37-11CE-AE65-
08002B2E1262}”<<” “<<fold_name<<“ndel unlock.bat”;
file.close();
} break;
case ‘3’:
{
ofstream file;
file.open(“unlock.bat”);
file<<“ren “<<fold_name<<“.{0DF44EAA-FF21-4412-828E-
260A8728E7F1}”<<” “<<fold_name<<“ndel unlock.bat”;
file.close();
} break;
case ‘4’:
{
ofstream file;
file.open(“unlock.bat”);
file<<“ren “<<fold_name<<“.{208D2C60-3AEA-1069-A2D7-
08002B30309D}”<<” “<<fold_name<<“ndel unlock.bat”;
file.close();
} break;
case ‘5’:
{
ofstream file;
file.open(“unlock.bat”);
file<<“ren “<<fold_name<<“.{20D04FE0-3AEA-1069-A2D8-
08002B30309D}”<<” “<<fold_name<<“ndel unlock.bat”;
file.close();
} break;
case ‘6’:
{
ofstream file;
file.open(“unlock.bat”);
file<<“ren “<<fold_name<<“.{645FF040-5081-101B-9F08-
00AA002F954E}”<<” “<<fold_name<<“ndel unlock.bat”;
file.close();
} break;
case ‘7’:
{
ofstream file;
file.open(“unlock.bat”);
file<<“ren “<<fold_name<<“.{6DFD7C5C-2451-11d3-A299-
00C04F8EF6AF}”<<” “<<fold_name<<“ndel unlock.bat”;
file.close();
} break;
case ‘8’:
{
ofstream file;
file.open(“unlock.bat”);
file<<“ren “<<fold_name<<“.{7007ACC7-3202-11D1-AAD2-
00805FC1270E}”<<” “<<fold_name<<“ndel unlock.bat”;
file.close();
} break;
default :
{
cout<<“nn Invalid Choice”;
cout<<“nnnnnnntttttttpress any key …”;
getch();
clrscr();
goto dfg;
}
}//ch
}//case2
case ‘c’:
case ‘C’:
{
exit(0);
}
default :
{
cout<<“nn Invalid Choice”;
cout<<“nnnnnnnnnnntttttttpress any key …”;
getch();
clrscr();
goto asd;
}
}//switchkk
break;}//if
else
{
cout<<“ann Renter secret code :”;
goto abc;
}
}//for
}//main
void print()
{
cout<<“n********************************************************
************************”;
textcolor(RED);
cprintf(“n NAME CRACKER”);
cprintf(“nn
Developed by: RITESH KAWAKDAR”);
textcolor(WHITE);
cout<<“nn******************************************************
**************************”;
}
void choice()
{
cout<<“nnnnt1> Media Clip”;//{00022602-0000-0000-C000-
000000000046}
cout<<“nnt2> Cabinet File”; //{0CD7A5C0-9F37-11CE-AE65-
08002B2E1262}
cout<<“nnt3> Taskbar And Start Menu”;//{0DF44EAA-FF21-4412-828E-
260A8728E7F1}
cout<<“nnt4> My Network Places”;//{208D2C60-3AEA-1069-A2D7-
08002B30309D}
cout<<“nnt5> My Computer”; //{20D04FE0-3AEA-1069-A2D8-
08002B30309D}
cout<<“nnt6> Recycle Bin”; //{645FF040-5081-101B-9F08-
00AA002F954E}
cout<<“nnt7> Folder Option”; //{6DFD7C5C-2451-11d3-A299-
00C04F8EF6AF}
cout<<“nnt8> Network Connection”;//{7007ACC7-3202-11D1-AAD2-
00805FC1270E}
cout<<“nnnnnn Enter Your choice : “;
}

download or view pdf files for some more tweks

More than 100 registry TIPS n TRICKS

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Archives

Blog Stats

  • 55,046 hits
%d bloggers like this: