Hello HF community .. I'm Sharing with you my very simple
security console source code .
the idea is the console starts up when windows starts
[put the console in startup folder manually]
Once started it will kill explorer.exe process.
the PC will look like nothing but black screen with the console on it [desktop background may appear sometimes too]
it will ask you to Enter you password , And if it was correct it will start explorer.exe else will shut down the PC.
hope u like the idea.
I'd love to hear ur feedback about this .
security console source code .
the idea is the console starts up when windows starts
[put the console in startup folder manually]
Once started it will kill explorer.exe process.
the PC will look like nothing but black screen with the console on it [desktop background may appear sometimes too]
it will ask you to Enter you password , And if it was correct it will start explorer.exe else will shut down the PC.
hope u like the idea.
I'd love to hear ur feedback about this .
Code
#include<iostream>
#include<stdlib.h>
#include<fstream>
#include<string>
using namespace std;
static string password;
ofstream savaData;
ifstream getData;
string userPass;
void line();void header();void taskKiller();void taskStarter();
void passwordSetter(string);bool passwordChecker(string);
void dash();bool passStatus();
//Section of Main //
void main (){
header();
if(passStatus()){
cout<<"\tEnter The Password inorder to Gain Access To the system : \n\t";
cin >> userPass;
if (passwordChecker(userPass)){
cout<<"\tPassword Matched successfully !\n\t";
taskStarter();
}else{
system("color 0c");
cout<<"\n\tWrong Information , Security Console Will now shutdown your system...";
system("shutdown /s -t 05 /f");
}
}else{
cout<<"\tPassword Has not been set yet , Set your New Password Here :\n\t";
cin >> userPass;
passwordSetter(userPass);
taskStarter();
}
system("pause");
}
//<header Functions>..
void dash(char x){
cout<<"\n\t#";
for(int i=0;i<=62;i++)
cout<<x;
cout<<"#";
}
void line(){
for(int i=0;i<=20;i++)
cout<<"#";
}
void header(){
taskKiller();
system("title Security Console");
system("color 0a");
cout<<"\t \n"<<endl;
system("cls");
cout<<"\t";
line();
cout<<" Security Console 18.1 ";
line();
dash(' ');
cout<<"\n\t#\t Written By : #Kali ### Shadow |HFC| # First Version \t#";
dash(' ');
dash('#');
cout<<endl<<endl;
}
//</header Functions>..
void passwordSetter(string pass){
savaData.open("setting.dat");
savaData << pass;
savaData.close();
}
bool passStatus()
{ bool res = false;
getData.open("setting.dat");
getData >> password;
getData.close();
if (password.compare("") == 0){
res = false;
}else{
res = true;
}
return res;
}
bool passwordChecker(string x){
bool res = false;
if (password.compare(x) == 0){
res = true;
}else{
res = false;
}
return res;
}
void taskKiller()
{
system("taskkill /IM explorer.exe /f");
}
void taskStarter()
{
system("start explorer.exe");
}

![[Image: 5Iq5rDJ.gif]](https://i.imgur.com/5Iq5rDJ.gif)
