Important alert: (current site time 6/19/2013 7:45:06 PM EDT)
 

VB icon

CMD Hack Sim beta

Email
Submitted on: 4/16/2012 6:31:26 PM
By: Reece James 
Level: Beginner
User Rating: Unrated
Compatibility: C++ (general)
Views: 1860
author picture
(About the author)
 
     I had an idea after playing a cmd line hacking game to try make my own, so started teaching myself c++ and got this far, wanted to see what people even think, if they would play it, it will probably just rot on my computer otherwise, feed back is greatly appreciated :P it's in c++ coded with mingw, all in the one file, so just copy, paste, compile, profit.

 
code:
Can't Copy and Paste this?
Click here for a copy-and-paste friendly version of this code!
 
Terms of Agreement:   
By using this code, you agree to the following terms...   
  1. You may use this code in your own programs (and may compile it into a program and distribute it in compiled format for languages that allow it) freely and with no charge.
  2. You MAY NOT redistribute this code (for example to a web site) without written permission from the original author. Failure to do so is a violation of copyright laws.   
  3. You may link to this code from another website, but ONLY if it is not wrapped in a frame. 
  4. You will abide by any additional copyright restrictions which the author may have placed in the code or code's description.
				
//**************************************
// Name: CMD Hack Sim beta
// Description:I had an idea after playing a cmd line hacking game to try make my own, so started teaching myself c++ and got this far, wanted to see what people even think, if they would play it, it will probably just rot on my computer otherwise,
feed back is greatly appreciated :P
it's in c++ coded with mingw, all in the one file, so just copy, paste, compile, profit.
// By: Reece James
//
//This code is copyrighted and has// limited warranties.Please see http://www.Planet-Source-Code.com/vb/scripts/ShowCode.asp?txtCodeId=13775&lngWId=3//for details.//**************************************

#include <iostream> 
#include <windows.h>//feel free to make changes to this code or use it in your own projects, i wont come after you
using namespace std;//anti-trust style ;)
					//i'll call myself DysFuncTional and leave it at that.
int yesStart = 11; //btw it's not teaching people how to actually hack, just a game that was an idea... :)
int noStart = 11;
string gameBegin = "";
string copyIp1 = "NoFile", copyIp2 = "NoFile", copyIp3 = "NoFile", copyDoc1 = "NoFile", copyDoc2 = "NoFile";
int deleteIp1 = 0, deleteIp2 = 0, deleteIp3 = 0;
int deleteDoc1 = 0, deleteDoc2 = 0;
string hackTip = "HackingTips.txt", hackTipShow = "hackingtips.txt";
int proGram1 = 1,proGram2 = 2;
string proString = "";
string passWordQuake = "sexytime";
string hackPassCode = "change*/#(";
string getPassHack = "";
int hackPassTool1 = 0,hackPassTool2 = 0;
string setPassCode = "$set";
string displayMenu = "help";
string echoScreen = "echo";
string clearScreen = "cls";
string getOption = "";
string getDocuments = "cd ", dirDocChange = "documents";
string getPassDir = "cd ", dirLogChange = "logfiles";
string goBackDir = "cd..";
int changeDir = 4, dirLoop = 0; 
string dirDoc = "Documents";
string dirLogs = "LogFiles";
string ipOne = "101.232.151.2";
string ipTwo = "15.895.153.59";
string ipThree = "102.101.001.011";
string docsOne = "quake.exe";
string docsTwo = "topsecret.txt";
string quakeExe = " Quake.exe";
int quakeSize = 63543;
string secretDoc = " TopSecret.txt";
int secretSize = 1423;
void topSecret(void)
{
	cout << "\n\n";
	cout << "Top Secret\n_________\nTopSecret.txt <c> 2012 mout ev rst./\n\n";
	cout << "Listen really close, the time is near, we have endured\n";
	cout << "all we can endure!\n";
	cout << "These hackers have been hacking our computers to much and we are\n";
	cout << "sick of it, i have uploaded a secret program to the computer, it's\n";
	cout << "name is under the guise of ""quake.exe"", you need to copy the file\n";
	cout << "to your harddrives, and delete it (this is a powerfull program we can't\n";
	cout << "risk even one of these hackers getting their greasy fingers on it!!!!) \n";
	cout << "if you don't have one by this stage, sorry but\n";
	cout << "either go out and buy one now or you are packing your bags...\n";
	cout << "once you have the file copied to your hardrive, load it into memory\n";
	cout << "it will execute automatically.\n\nfrom here the program has a passcode\n";
	cout << "for security purposes, the passcode has been physically mailed to you\n\n";
	cout << "___Signed___YourDeveloperBoss__!!\nsys.incs<c>2012USnaval/stateDep.tradeunion.\n\n"; 
}
void hackingTipFunc(void)
{
	cout << "\n\n";
	cout << "Hacking Tips\n_________\n" << hackTip << " <c> 2012 hack.std.exploit.hashteam13/\n\n";
	cout << "\thacking tips for hackers by hackers....\n";
	cout << "if you want to hack a programs password listen up..\n";
	cout << "you will need to use a well known security exploit for programs\nknown as, exe'injecting;";
	cout << " How To Do It!\n\n";
	cout << "first you need to set the password variable to what you want it to be so\n";	
	cout << "do that by entering in the pass input section - <$set>\n\t\t\ti.e *enter password: $set*\n";
	cout << "once you use <$set> cmd correctly at passcode selection, it'll \n";
	cout << "show a <#> symbol to let you know you it worked. you are now at the stage\n";
	cout << " to set a password.. set your password.. a short password..\n";
	cout << "You are now left at a fresh input pass screen, ignore invaild errors\n";
	cout << "Enter the password change code, change*/#(new password)\n\t i.e change*/#(GOD)\n";
	cout << "don't worry about the juicy details, all you need to know is the\nchanged password ";
	cout << "is to be 3 characters long, just like in the demonstration...\n";
	cout << "once you have completed these steps, you have successfully\n changed the programs password.\n";
	cout << "Now log on the program with the new password hehe ;)\n\n";
	cout << "___Signed___HackTheWorld__!!\nsys.incs<c>2012	hack.std.exploit.hashteam13/\n\n";
}
void hardDrive(void)
{
	cout << "\nWV mega:volume D:/...../\n contains said following\n";
	cout << "if the files are not showing, you must go to the first\n";
	cout << "directory to refresh files on HD!\n\n";
	cout << copyIp1 << " /" << "::\n";
	cout << copyIp2 << " /" << "::\n";
	cout << copyIp3 << " /" << "::\n"; 
	cout << copyDoc1 << " /" << "::\n";
	cout << copyDoc2 << " /" << "::\n";
	cout << hackTip << " /" << "::\n\n";
}
void pingIpFunc1(void)
{
	for(int i = 0; i < 101; i++)
	{
	cout << "\r" << "Pinging " << ipOne << " with 32 packets of data(%" << i << ")";
	Sleep(6);
	}
	cout << "\n\n";
	for(int i = 0; i < 101; i++)
	{
	cout << "\r" << "#(%" << i << ")";
	Sleep(20);
	}
	cout << "Reply from " << ipOne << ": bytes=32 time=0ms TTL=55\n";
	for(int i = 0; i < 101; i++)
	{
	cout << "\r" << "#(%" << i << ")";
	Sleep(17);
	}
	cout << "Reply from " << ipOne << ": bytes=32 time=0ms TTL=55\n";
	for(int i = 0; i < 101; i++)
	{
	cout << "\r" << "#(%" << i << ")";
	Sleep(14);
	}
	cout << "Reply from " << ipOne << ": bytes=32 time=0ms TTL=55\n";
	for(int i = 0; i < 101; i++)
	{
	cout << "\r" << "#(%" << i << ")";
	Sleep(9);
	}
	cout << "Reply from " << ipOne << ": bytes=32 time=26ms TTL=55\n\n\n";
	cout << "Ping statistics for " << ipOne << ":\n";
	cout << "\tPackets send = 4 Recived = 4 Lost = 0 (0% loss).\n";
	cout << "Approximate round trip times in Milli-seconds:\n";
	cout << "\tMinimum = 21ms, Maximum = 34ms, Average = 26ms\n\n";
	
}
void pingIpFunc2(void)
{
	for(int i = 0; i < 101; i++)
	{
	cout << "\r" << "Pinging " << ipTwo << " with 32 packets of data(%" << i << ")";
	Sleep(6);
	}
	cout << "\n\n";
	for(int i = 0; i < 101; i++)
	{
	cout << "\r" << "#(%" << i << ")";
	Sleep(20);
	}
	cout << "Reply from " << ipTwo << ": bytes=32 time=24ms TTL=55\n";
	for(int i = 0; i < 101; i++)
	{
	cout << "\r" << "#(%" << i << ")";
	Sleep(17);
	}
	cout << "Reply from " << ipTwo << ": bytes=32 time=27ms TTL=55\n";
	for(int i = 0; i < 101; i++)
	{
	cout << "\r" << "#(%" << i << ")";
	Sleep(14);
	}
	cout << "Reply from " << ipTwo << ": bytes=32 time=38ms TTL=55\n";
	for(int i = 0; i < 101; i++)
	{
	cout << "\r" << "#(%" << i << ")";
	Sleep(9);
	}
	cout << "Reply from " << ipTwo << ": bytes=32 time=27ms TTL=55\n\n\n";
	cout << "Ping statistics for " << ipTwo << ":\n";
	cout << "\tPackets send = 4 Recived = 4 Lost = 0 (0% loss).\n";
	cout << "Approximate round trip times in Milli-seconds:\n";
	cout << "\tMinimum = 24ms, Maximum = 38ms, Average = 27ms\n\n";
	
}
void pingIpFunc3(void)
{
	for(int i = 0; i < 101; i++)
	{
	cout << "\r" << "Pinging " << ipThree << " with 32 packets of data(%" << i << ")";
	Sleep(6);
	}
	cout << "\n\n";
	for(int i = 0; i < 101; i++)
	{
	cout << "\r" << "#(%" << i << ")";
	Sleep(20);
	}
	cout << "Reply from " << ipThree << ": bytes=32 time=0ms TTL=55\n";
	for(int i = 0; i < 101; i++)
	{
	cout << "\r" << "#(%" << i << ")";
	Sleep(17);
	}
	cout << "Reply from " << ipThree << ": bytes=32 time=0ms TTL=55\n";
	for(int i = 0; i < 101; i++)
	{
	cout << "\r" << "#(%" << i << ")";
	Sleep(14);
	}
	cout << "Reply from " << ipThree << ": bytes=32 time=0ms TTL=55\n";
	for(int i = 0; i < 101; i++)
	{
	cout << "\r" << "#(%" << i << ")";
	Sleep(9);
	}
	cout << "Reply from " << ipThree << ": bytes=32 time=26ms TTL=55\n\n\n";
	cout << "Ping statistics for " << ipThree << ":\n";
	cout << "\tPackets send = 4 Recived = 0 Lost = 4 (100% loss).\n";
	cout << "Approximate round trip times in Milli-seconds:\n";
	cout << "\tMinimum = 0ms, Maximum = 0ms, Average = 0ms\n\n";
	
}
void copyIpFunc1(void)
{
	for(int i = 0; i < 101; i++)
	{
	cout << "\r" << "Pinging " << copyIp1 << " with 32 packets of data(%" << i << ")";
	Sleep(6);
	}
	cout << "\n\n";
	for(int i = 0; i < 101; i++)
	{
	cout << "\r" << "#(%" << i << ")";
	Sleep(20);
	}
	cout << "Reply from " << copyIp1 << ": bytes=32 time=0ms TTL=55\n";
	for(int i = 0; i < 101; i++)
	{
	cout << "\r" << "#(%" << i << ")";
	Sleep(17);
	}
	cout << "Reply from " << copyIp1 << ": bytes=32 time=0ms TTL=55\n";
	for(int i = 0; i < 101; i++)
	{
	cout << "\r" << "#(%" << i << ")";
	Sleep(14);
	}
	cout << "Reply from " << copyIp1 << ": bytes=32 time=0ms TTL=55\n";
	for(int i = 0; i < 101; i++)
	{
	cout << "\r" << "#(%" << i << ")";
	Sleep(9);
	}
	cout << "Reply from " << copyIp1 << ": bytes=32 time=26ms TTL=55\n\n\n";
	cout << "Ping statistics for " << copyIp1 << ":\n";
	cout << "\tPackets send = 4 Recived = 4 Lost = 0 (0% loss).\n";
	cout << "Approximate round trip times in Milli-seconds:\n";
	cout << "\tMinimum = 21ms, Maximum = 34ms, Average = 26ms\n\n";
	
}
void copyIpFunc2(void)
{
	for(int i = 0; i < 101; i++)
	{
	cout << "\r" << "Pinging " << copyIp2 << " with 32 packets of data(%" << i << ")";
	Sleep(6);
	}
	cout << "\n\n";
	for(int i = 0; i < 101; i++)
	{
	cout << "\r" << "#(%" << i << ")";
	Sleep(20);
	}
	cout << "Reply from " << copyIp2 << ": bytes=32 time=24ms TTL=55\n";
	for(int i = 0; i < 101; i++)
	{
	cout << "\r" << "#(%" << i << ")";
	Sleep(17);
	}
	cout << "Reply from " << copyIp2 << ": bytes=32 time=27ms TTL=55\n";
	for(int i = 0; i < 101; i++)
	{
	cout << "\r" << "#(%" << i << ")";
	Sleep(14);
	}
	cout << "Reply from " << copyIp2 << ": bytes=32 time=38ms TTL=55\n";
	for(int i = 0; i < 101; i++)
	{
	cout << "\r" << "#(%" << i << ")";
	Sleep(9);
	}
	cout << "Reply from " << copyIp2 << ": bytes=32 time=27ms TTL=55\n\n\n";
	cout << "Ping statistics for " << copyIp2 << ":\n";
	cout << "\tPackets send = 4 Recived = 4 Lost = 0 (0% loss).\n";
	cout << "Approximate round trip times in Milli-seconds:\n";
	cout << "\tMinimum = 24ms, Maximum = 38ms, Average = 27ms\n\n";
	
}
void copyIpFunc3(void)
{
	for(int i = 0; i < 101; i++)
	{
	cout << "\r" << "Pinging " << copyIp3 << " with 32 packets of data(%" << i << ")";
	Sleep(6);
	}
	cout << "\n\n";
	for(int i = 0; i < 101; i++)
	{
	cout << "\r" << "#(%" << i << ")";
	Sleep(20);
	}
	cout << "Reply from " << copyIp3 << ": bytes=32 time=0ms TTL=55\n";
	for(int i = 0; i < 101; i++)
	{
	cout << "\r" << "#(%" << i << ")";
	Sleep(17);
	}
	cout << "Reply from " << copyIp3 << ": bytes=32 time=0ms TTL=55\n";
	for(int i = 0; i < 101; i++)
	{
	cout << "\r" << "#(%" << i << ")";
	Sleep(14);
	}
	cout << "Reply from " << copyIp3 << ": bytes=32 time=0ms TTL=55\n";
	for(int i = 0; i < 101; i++)
	{
	cout << "\r" << "#(%" << i << ")";
	Sleep(9);
	}
	cout << "Reply from " << copyIp3 << ": bytes=32 time=26ms TTL=55\n\n\n";
	cout << "Ping statistics for " << copyIp3 << ":\n";
	cout << "\tPackets send = 4 Recived = 0 Lost = 4 (100% loss).\n";
	cout << "Approximate round trip times in Milli-seconds:\n";
	cout << "\tMinimum = 0ms, Maximum = 0ms, Average = 0ms\n\n";
	
}
void killerProgram(void)
{
		int i = 0, e = 1;
		string killGet = "";
		system("CLS");
		
		cout << "\n\n*INSIDE KILLER*\n\n";
		cout << "So you made it into the depths of killer, from here you are trusted\n";
		cout << "no code in here, we get to the point from within killer...\n";
		cout << "the matter at hand is that of world wide security, this had to be said\n";
		cout << "with in killer because our system's are not secure, people just walk into\n";
		cout << "the old server rooms and PLUG RIGHT IN! it's insane...\n\n";
		cout << "Okay the Point, depends on who you are:\n";
		cout << "A - to see full detail our whole agenda\n";
		cout << "LP - to list the people invovled\n";
		cout << "S - to see this list again\n";
		cout << "H - for our background (who we were, if you didn't know, this is for you\n";
		cout << "Q - to quit killer\n\n";
		while(i != e)
		{
		cout << "KILLERS_BELLY-_->";
		getline(cin, killGet);
		if(killGet == "a")
		{
			cout << "\n\nwhole agenda here\n\n";
		}
		else if(killGet == "lp")
		{
			cout << "\n\nlist people involved here\n\n";
		}
		else if(killGet == "s")
		{
		cout << "\n\nA - to see full detail our whole agenda\n";
		cout << "LP - to list the people invovled\n";
		cout << "S - to see this list again\n";
		cout << "H - for our background (who we were, if you didn't know, this is for you\n";
		cout << "Q - to quit killer\n\n";		
		}
		else if(killGet == "h")
		{
			cout << "\n\ndetail whole background here\n\n";
		}
		else if(killGet == "q")
		{
		proGram1 = 2;
		i = 1;
		cout << "\n\n!KILLERCLOSE!\nkeep killer secret\n\n";
		}
		else
		{
		cout << "\n\nKILLER DON'T KNOW SAID COMMAND, GET THIS RIGHT\n\n";
		}
		}
}
void quakeGuise(void)
{
	cout << "\n\n\t\twelcome to Killer_Inc\nenter stop to exit\n\n";
	while(proGram1 != proGram2)
	{
	
	cout << "\tPasscode: ";
	getline(cin, proString);
	if(proString == passWordQuake)
	{
		killerProgram();
	}
	else if(proString == "stop")
	{
		proGram1 = 2;
		cout << endl << endl;
	}
	else if(proString == hackPassCode + getPassHack + ")")
	{
		passWordQuake = getPassHack;
		cout << "\n\n*#incorrect/_/passcode#*\n try again.\n\n";
	}
	else if(proString == setPassCode)
	{
		cout << "\n\n\tPasscode:#";
		getline(cin, getPassHack);	
		cout << "\n\n!#incorrect/_/passcode#!\n try again.\n\n";
	}
	else
	{
		cout << "\n\n*incorrect passcode*\n try again.\n\n";
	}
	
	}
}
void delIpFunc(void)
{
	if(deleteIp1 == 1)
	{
	copyIp1 = "101.232.151.2";
	}
	if(deleteIp2 == 1)
	{
	copyIp2 = "15.895.153.59";
	}
	if(deleteIp3 == 1)
	{
	copyIp3 = "102.101.001.011";
	}
}
void delDocFunc(void)
{
	if(deleteDoc1 == 1)
	{
	copyDoc1 = "Quake.exe";
	quakeSize = 0;
	}
	if(deleteDoc2 == 1)
	{
	copyDoc2 = "TopSecret.txt";
	secretSize = 0;
	}
}	
void welcomeMsg(void)
{
	cout << "\n\n\n\n\t\tWelcome to this little simulation! :)\n";
	cout << "\t\t_________________________________\n\n";
	cout << "\tYou are a hacker, you are on someone else's computer..\n\n";
	cout << "\tYour harddrive is plugged in, a sketchy hacker tip is on it..\n";
	cout << "\tScout this system for something of interest to a \n";
	cout << "\tMaster Hacker like yourself\n\n";
	cout << "\tWhile in Game..\n";
	cout << "type HELP to get a list of what is available to you in the game...\n";
	cout << "type ""I AM GOD"" to log off his computer whilst on the first directory...\n\n";
	cout << "tpress enter to begin the game...";
	getline(cin, gameBegin);	
}
void firstDir(void)
{
	cout << "\n2:46 PM<DIR> " << " . ";	
	cout << "\n1:05 PM<DIR> " << dirDoc << endl;
	cout << "11:13 PM <DIR> " << dirLogs << endl << endl;
}
void secDocDir(void)
{
	cout << "\n2:46 PM <DIR> " << " . ";
	cout << "\n2:45 PM <DIR> " << " .. ";
	cout << "\n4:56" << quakeSize << quakeExe << endl;
	cout << "5:06 AM " << secretSize << secretDoc << endl;
	cout << "\n";
}
void passDocDir()
{
	cout << "\n2:46 PM <DIR>" << " . ";
	cout << "\n2:45 PM <DIR> " << " .. ";
	cout << "\n4:56 " << ipOne << endl;
	cout << "5:06 AM " << ipTwo << endl;
	cout << "5:23 AM " << ipThree << endl;	
	cout << "\n";
}
void callMenu(void)
{
	cout << "\n Menu:\n\n";
	cout << "HELP - displays this menu\n";
	cout << "PING - pings an ip address i.e ping <ip adress>\n";
	cout << "OPEN - opens txt, doc, etc files i.e open <file name>\n";
	cout << "LOAD - opens txt, doc, etc files from HDD i.e load <file name>\n";
	cout << "CLS - clears the screen\n";
	cout << "CD - change directory, i.e cd <folder name>\n";
	cout << "CD.. - go back a directory\n";
	cout << "DELCOPY - deletes and copies a file to your harddrive i.e delcopy <file name>\n";
	cout << "HD - display contents of harddrive\n";
	cout << "DIR - display current directory on screen\n";
	cout << "ECHO - display a message on the screen\n\n";
}
void echoMsg(void)
{
	string getEcho = "";
	getline(cin, getEcho);
	cout << "\n\t";
	cout << getEcho;
	cout << "\n\n";
}
void sysCls(void)
{
	system("CLS");
}
void syntaxError(void)
{
	cout << "\nSyntax Unknown/error/404_not_found.../\n\n";
}
void screenClear(void)
{
	cout << "Microloft Findows HexPee [version 6.9.er]";
	cout << "\n(C) Copyright 1985 - 2001 Microloft Corpse\n\n";
}
void thirdDir(void)
{
	int finishGame = 0, startGame = 1;
	while(finishGame != startGame)
	{
	delIpFunc();
	cout << "C:/>";
	getline(cin, getOption);
	if(getOption == displayMenu)
	{
		callMenu();
	}
	else if(getOption == "cls")
	{
		sysCls();
	}
	else if(getOption == "echo")
	{
		cout << "\n\tmessage to display\n" << "\t:>";
		echoMsg();
	}
	else if(getOption == goBackDir)
	{
		finishGame = finishGame++;
	}
	else if(getOption == "dir")
	{
		cout << endl;
		passDocDir();
		cout << endl;
	}
	else if(getOption == "hd")
	{
		cout << "\n";
		hardDrive();
	}
	else if(getOption == "delcopy " + ipOne)
	{
		cout << "\n\n";
		cout << "\t" << ipOne << " successfully deleted\n\n";
		ipOne = "........";
		deleteIp1 = 1;
		cout << "\n\tand successfully copied to harddrive..\n\n";
	}	
	else if(getOption == "delcopy " + ipTwo)
	{
		cout << "\n\n";
		cout << "\t" << ipTwo << " successfully deleted\n\n";
		ipTwo = "........";
		deleteIp2 = 1;
		cout << "\n\tand successfully copied to harddrive..\n\n";
	}
	else if(getOption == "delcopy " + ipThree)
	{
		cout << "\n\n";
		cout << "\t" << ipThree << " successfully deleted\n\n";
		ipThree = "........";
		deleteIp3 = 1;
		cout << "\n\tsuccessfully copied to harddrive..\n\n";
	}	
	else if(getOption == "cmd")
	{
		cout << endl;
		screenClear();
	}
	else if(getOption == "load")
	{
	cout << "\n\tLoading from Hard Drive...\n\n";
	cout << "Sorry, go to first directory to load files from hard drive\n\n";
	}
	else if(getOption == "ping " + ipOne)
	{
		cout << "\n\n";
		pingIpFunc1();
		cout << "\n\n";		
	}
	else if(getOption == "ping " + ipTwo)
	{
		cout << "\n\n";
		pingIpFunc2();
		cout << "\n\n";		
	}
	else if(getOption == "ping " + ipThree)
	{
		cout << "\n\n";
		pingIpFunc3();
		cout << "\n\n";		
	}
	else if(getOption == "ping " + copyIp1)
	{
		cout << "\n\n";
		copyIpFunc1();
		cout << "\n\n";		
	}
	else if(getOption == "ping " + copyIp2)
	{
		cout << "\n\n";
		copyIpFunc2();
		cout << "\n\n";		
	}
	else if(getOption == "ping " + copyIp3)
	{
		cout << "\n\n";
		copyIpFunc3();
		cout << "\n\n";		
	}	
	else
	{
		syntaxError();
	}	
	}	
}
void secondDir(void)
{
	int finishGame = 0, startGame = 1;
	while(finishGame != startGame)
	{
	delDocFunc();
	cout << "C:/>";
	getline(cin, getOption);
	if(getOption == displayMenu)
	{
		callMenu();
	}
	else if(getOption == "cls")
	{
		sysCls();
	}
	else if(getOption == "echo")
	{
		cout << "\n\tmessage to display\n" << "\t:>";
		echoMsg();
	}
	else if(getOption == goBackDir)
	{
		finishGame = finishGame++;
	}
	else if(getOption == "dir")
	{
		cout << endl;
		secDocDir();
		cout << endl;
	}
	else if(getOption == "hd")
	{
		cout << "\n";
		hardDrive();
	}
	else if(getOption == "delcopy " + docsOne)
	{
		cout << "\n\n";
		cout << "\t" << quakeExe << " successfully deleted\n\n";
		quakeExe = "........";
		deleteDoc1 = 1;
		cout << "\n\tsuccessfully copied to harddrive..\n\n";
	}	
	else if(getOption == "delcopy " + docsTwo)
	{
		cout << "\n\n";
		cout << "\t" << secretDoc << " successfully deleted\n\n";
		secretDoc = "........";
		deleteDoc2 = 1;
		cout << "\n\tsuccessfully copied to harddrive..\n\n";
	}
	else if(getOption == "load " + docsOne)
	{
		if(deleteDoc1 == 1)
		{
		cout << "\n\tLoading from Hard Drive...\n\n";
		cout << "Sorry, go to first directory to load files from hard drive\n\n";
		}
		else
		{
			cout << "\n\nSorry, File not found?\n\n"; 
		}
	}
	
	else if(getOption == "cmd")
	{
		cout << endl;
		screenClear();
	}
	else if(getOption == "open " + docsTwo)
	{
		if(deleteDoc2 == 0)
		{
			topSecret();
		}
		else
		{
			cout << "\n\nSorry, File not found?\n\n"; 
		}
	}
	else if(getOption == "load " + docsTwo)
	{
	if(deleteDoc2 == 1)
	{
	cout << "\n\tLoading from Hard Drive...\n\n";
	cout << "Sorry, go to first directory to load files from hard drive\n\n";
	}
	else
	{
		cout << "\n\nFile not found\n\n";
	}
	}
	else
	{
		syntaxError();
	}	
	}	
}
void rootDir(void)
{
	int finishGame = 0, startGame = 1;
	
	while(finishGame != startGame)
	{
	delIpFunc();
	delDocFunc();
	cout << "C:/>";
	getline(cin, getOption);
	if(getOption == displayMenu)
	{
		callMenu();
	}
	else if(getOption == "cls")
	{
		sysCls();
	}
	else if(getOption == "echo")
	{
		cout << "\n\tmessage:\n" << "\t:>";
		echoMsg();
	}
	else if(getOption == getDocuments + dirDocChange)
	{
		cout << "\n";
		secondDir();
		cout << endl;
	}
	else if(getOption == "dir")
	{
		cout << "\n";
		firstDir();
	}
	else if(getOption == "cd..")
	{
		cout << "\n\nYour are on the first directory\n you cannot go back anymore\n\n";
	}
	else if(getOption == getPassDir + dirLogChange)
	{
		cout << endl;
		thirdDir();
		cout << endl;
	}
	else if(getOption == "hd")
	{
		cout << "\n";
		hardDrive();
	}
	else if(getOption == "delcopy logfiles")
	{
		cout << "\ncannot delete directories!\n\n";
	}
	else if(getOption == "delcopy documents")
	{
		cout << "\ncannot delete directories!\n\n";
	}	
	else if(getOption == "I AM GOD")
	{
		yesStart = 0;
		finishGame = 1;
	}
	else if(getOption == "cmd")
	{
		cout << endl;
		screenClear();
	}
	else if(getOption == "load " + docsTwo)
	{
	if(deleteDoc2 == 1)
	{
	cout << "\n\tLoading from Hard Drive...\n\n";
	topSecret();
	}
	else
	{
		cout << "\nFile Not Found On HD!\n\n";
	}
	}
	else if(getOption == "load " + docsOne)
	{
	if(deleteDoc1 == 1)
	{
	cout << "\n\tLoading from Hard Drive...\n\n";
	quakeGuise();
	cout << "\n\n\tBYE!!\n\n";
	proGram1 = 1;	
	}
	else
	{
	cout << "\nFile Not Found On HDD!\n\n";
	}
	}
	else if(getOption == "load " + hackTipShow)
	{
		hackingTipFunc();
	}
	else if(getOption == "ping " + ipOne)
	{
		cout << "\n\n";
		pingIpFunc1();
		cout << "\n\n";		
	}
	else if(getOption == "ping " + ipTwo)
	{
		cout << "\n\n";
		pingIpFunc2();
		cout << "\n\n";		
	}
	else if(getOption == "ping " + ipThree)
	{
		cout << "\n\n";
		pingIpFunc3();
		cout << "\n\n";		
	}
	else if(getOption == "ping " + copyIp1)
	{
		cout << "\n\n";
		copyIpFunc1();
		cout << "\n\n";		
	}
	else if(getOption == "ping " + copyIp2)
	{
		cout << "\n\n";
		copyIpFunc2();
		cout << "\n\n";		
	}
	else if(getOption == "ping " + copyIp3)
	{
		cout << "\n\n";
		copyIpFunc3();
		cout << "\n\n";		
	}	
	else
	{
		syntaxError();
	}	
	}
}
int main()
{
	welcomeMsg();
	system("CLS");
	screenClear();
	while( yesStart == noStart )
	{
	rootDir();
	}
	cout << "\n\n" << "Thanks for playing!\n";
	cin.get();
	cin.sync();
	return 0;
}


Other 1 submission(s) by this author

 


Report Bad Submission
Use this form to tell us if this entry should be deleted (i.e contains no code, is a virus, etc.).
This submission should be removed because:

Your Vote

What do you think of this code (in the Beginner category)?
(The code with your highest vote will win this month's coding contest!)
Excellent  Good  Average  Below Average  Poor (See voting log ...)
 

Other User Comments


 There are no comments on this submission.
 

Add Your Feedback
Your feedback will be posted below and an email sent to the author. Please remember that the author was kind enough to share this with you, so any criticisms must be stated politely, or they will be deleted. (For feedback not related to this particular code, please click here instead.)
 

To post feedback, first please login.