Right, so its nearly 3 am and I can not sleep so I thought I would make a little useless program for Windows… Put simply it basically asks “How can I help” if you type “Secret it will run “tree c:/” command on Windows. For those that don’t know what that does it displays an itemized view of your C:/ Drive. It looks pretty cool even though it’s literally useless. If you type anything else the program will exit out. Again this was just something I made because I can’t sleep and I needed something to do 😀
As a side note… I know the bool is not needed at all, again it gave me something to do…
#include <iostream>
#include <Windows.h>
void stage2();
int main();
bool isActive = false;
std::string input = "";
void nope();
void check()
{
while (isActive == false)
{
std::cout << "Checking ID" << std::endl;
isActive = true;
if (isActive == true && input == "secret")
{
isActive = false;
stage2();
}
else
{
std::cout << "Nope... There is no access... Exiting";
exit(9);
}
}
}
void stage2()
{
std::cout << "This works" << std::endl << "\n \n \n \n";
system ("tree c:/");
main();
}
void failed()
{
check();
}
void nope()
{
std::cout << "No Access!";
exit(999);
}
int main()
{
std::cout << "How can i help you?" << std::endl;
std::cin >> input;
check();
}