Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include<iostream>
- #include<stdio.h>
- #include<conio.h>
- #include<string>
- #include<windows.h>
- #include<fstream>
- #include<ctime>
- #include <time.h>
- #include <stdlib.h>
- #include <cstdlib>
- #define NCOMPUTERS 10 //BROJ KOMPJUTERA ZA NAPRAVIT
- using namespace std;
- string TARGET_IP;
- int TARGET_PORT;
- int TARGET_PING;
- string TARGET_OS;
- string COMP_IPS[10];
- string TARGET_EXPLOIT;
- int MONEY;
- //INIT_VAR#######################################
- void Initgame();
- void LogIn();
- void LogInSucess();
- void Interface();
- void MakeComputers();
- void DisplayComputers();
- void DisplayMain();
- void InputAlgoritam(string input);
- void Ping();
- void TargetIP();
- void Scan();
- void ScanAnimation();
- void Nmap();
- void Exploit();
- void ReadIPFile();
- void CreateExploits();
- void DisplayExploits();
- void ExploitDB();
- void DarkShop();
- void DarkShopAnimation();
- //###########################################
- class Exploits{
- public:
- int id;
- string exploit_name;
- string exploit_desc;
- string exploit_os;
- int exploit_port;
- int exploit_price;
- string exploit_nname[5]{
- "Windows Reverse TCP",
- "Linux Reverse TCP",
- "Hail Mary",
- "Binder",
- "Windows Shell"
- };
- string exploit_ddesc[5]{
- "Used for control of TARGET Windows/Windows Server PC",
- "Used Used for control of TARGET Linux Based PC",
- "Text ALL exploits on TARGET PC",
- "Binding Agent, used for gathering input informations",
- "Shell for code executing on TARGET PC"
- };
- string exploit_oos[5]{
- "Windows 10",
- "Windows Server",
- "Linux",
- "Debian",
- "DOS"
- };
- }Exploitt[5],UserExploits[5];
- void CreateExploits(){
- int i;
- for(i=0;i<5;i++){
- Exploitt[i].id = i;
- Exploitt[i].exploit_name = Exploitt[i].exploit_nname[i];
- Exploitt[i].exploit_desc = Exploitt[i].exploit_ddesc[i];
- Exploitt[i].exploit_os = Exploitt[i].exploit_oos[i];
- }
- }
- void DisplayExploits(){
- int i;
- for(i=0;i<5;i++){
- cout <<"Exploit ID: "<< Exploitt[i].id << " Exploit name: " << Exploitt[i].exploit_name << " Exploit desc: " << Exploitt[i].exploit_desc << " Exploit OS: " << Exploitt[i].exploit_os << endl;
- }
- }
- class Computers{
- public:
- int comp_id;
- string comp_name;
- string comp_ip;
- string comp_os;
- string comp_location;
- int comp_port;
- int comp_ping;
- bool isAlive;
- string comp_names[5]{
- "Chinese Server",
- "Personal Computer",
- "Bank",
- "IBM",
- "VPN"
- };
- string comp_oss[5]{
- "Windows 10",
- "Windows Server",
- "Linux",
- "Debian",
- "DOS"
- };
- string comp_locations[5]{
- "Europe",
- "America",
- "China",
- "Russia",
- "Africa"
- };
- int comp_ports[5]{
- 20,
- 22,
- 80,
- 120,
- 450
- };
- string comp_ips[10];
- //FUNKCIJE DEKLARACIJA
- void MakeComputers();
- }kompovi[NCOMPUTERS];
- void MakeComputers(){
- int i;
- for(i=0;i<NCOMPUTERS;i++){
- kompovi[i].comp_id = i;
- kompovi[i].comp_name = kompovi[i].comp_names[rand() % 4];
- kompovi[i].comp_ip = COMP_IPS[i];
- kompovi[i].comp_os = kompovi[i].comp_oss[rand() % 4];
- kompovi[i].comp_location = kompovi[i].comp_locations[rand() % 4];
- kompovi[i].comp_port = kompovi[i].comp_ports[rand() % 4];
- kompovi[i].isAlive = rand() % 2;
- }
- }
- void DisplayComputers(){
- int i;
- for(i=0;i<NCOMPUTERS;i++){
- cout << "Komp " << kompovi[i].comp_id << " ,Komp name: " << kompovi[i].comp_name << " ,Komp IP: " << kompovi[i].comp_ip << " ,Komp OS: " << kompovi[i].comp_os << ", Komp Loc: " <<kompovi[i].comp_location << " ,Komp Port: " << kompovi[i].comp_port << " ,Komp ziv: " << kompovi[i].isAlive <<endl;
- }
- }
- //INIT FUNKCIJA##
- void Initgame(){
- LogIn();
- }
- //#################################################
- void GameText(int id){
- switch(id){
- case 1:
- cout<<"Ping TARGET - Ping IP Address"<< endl;
- cout<<"Target (IP) - Targets IP for further use"<< endl;
- cout<<"scan - Scans IP Addresses"<<endl;
- cout<<"nmap TARGET - Scans IP Address for OS and Exploit dettection"<<endl;
- cout<<"exploitdb - Database of private exploits to use on TARGET"<<endl;
- cout<<"exploit TARGET - exploits port of IP with custom exploit"<<endl;
- cout<<"darkshop - exploits shopping" << endl;
- break;
- case 2:
- cout<<"###### ## ## ## ## ## ## ######## ######## "<<endl;
- cout<<"## ## ## ## ## ## ### ## ## ## "<<endl;
- cout<<"## ## ## #### #### ## ## ## "<<endl;
- cout<<" ###### ##### ## ## ## ## ###### ## "<<endl;
- cout<<" ## ## ## ## ## #### ## ## "<<endl;
- cout<<"## ## ## ## ## ## ### ## ## "<<endl;
- cout<<" ###### ## ## ## ## ## ######## ## "<<endl;
- break;
- case 3:
- cout << "__________________________" << endl;
- cout << "TARGET_IP| "<<TARGET_IP <<" |" << endl;
- cout << "--------------------------" << endl;
- cout << "TARGET_PORT| "<<TARGET_PORT <<" |" << endl;
- cout << "--------------------" << endl;
- cout << "TARGET_PING| "<<TARGET_PING <<" |" << endl;
- cout << "-----------------" << endl;
- cout << "TARGET_OS| "<<TARGET_OS << " |"<< endl;
- cout << "-----------------" << endl;
- cout << "TARGET_EXPLOIT| "<<TARGET_EXPLOIT << " |"<<endl;
- cout << "----------------------------------------"<<endl;
- break;
- case 4:
- cout<<" ###### ## ## ## ## ## ## ######## ######## ######## ### ## ## ######## ####### ## ## ######## ######## "<<endl;
- cout<<"## ## ## ## ## ## ### ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## "<<endl;
- cout<<"## ## ## #### #### ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## "<<endl;
- cout<<" ###### ##### ## ## ## ## ###### ## ## ## ## ##### ###### ## ## ## ## ###### ######## "<<endl;
- cout<<" ## ## ## ## ## #### ## ## ## ######### ## ## ## ## ## ## ## ## ## ## "<<endl;
- cout<<"## ## ## ## ## ## ### ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## "<<endl;
- cout<<" ###### ## ## ## ## ## ######## ## ####### ## ## ## ## ## ######## ####### ### ######## ## ## "<<endl;
- break;
- case 5:
- cout << "CASH: " << MONEY << "$" <<endl;
- break;
- case 6:
- cout<<"######## ### ######## ## ## ###### ## ## ####### ######## "<<endl;
- cout<<"## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## "<<endl;
- cout<<"## ## ## ## ## ## ## ## ## ## ## ## ## ## ## "<<endl;
- cout<<"## ## ## ## ######## ##### ###### ######### ## ## ######## "<<endl;
- cout<<"## ## ######### ## ## ## ## ## ## ## ## ## ## "<<endl;
- cout<<"## ## ## ## ## ## ## ## ## ## ## ## ## ## ## "<<endl;
- cout<<"######## ## ## ## ## ## ## ###### ## ## ####### ## "<<endl;
- break;
- case 7:
- cout<<"browse - Browse Database of Exploits"<<endl;
- cout<<"hardware - Browse Hardware to for PC upgrading"<<endl;
- cout<<"disconnect - Leave server"<<endl;
- break;
- }
- }
- //ATTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTACK
- void Ping(){
- int i, pingg;
- pingg = rand() % 500;
- cout << "Pinging " << TARGET_IP << endl;
- for(i=0;i<NCOMPUTERS;i++){
- if(kompovi[i].comp_ip == TARGET_IP){
- kompovi[i].comp_ping = pingg;
- TARGET_PING = pingg;
- }
- }
- Sleep(5000);
- system("CLS");
- Interface();
- }
- void TargetIP(){
- string t_ip;
- int i;
- cout << "Enter IP to target: ";
- cin >> t_ip;
- for(i=0;i< NCOMPUTERS;i++){
- if(kompovi[i].comp_ip == t_ip){
- TARGET_IP = kompovi[i].comp_ip;
- TARGET_PORT = kompovi[i].comp_port;
- }
- }
- system("CLS");
- Interface();
- }
- //SCAN ART
- void ScanAnimation(){
- cout << "Scanning Vunerable IP's.";
- Sleep(3000);
- cout <<".";
- Sleep(3000);
- cout <<".";
- Sleep(3000);
- }
- void ScanResult(){
- int rand_num;
- int i;
- rand_num = rand() % 3;
- cout << "Found " << rand_num << " vulnerable IP addresse's: " << endl;
- for(i=0;i< rand_num;i++){
- cout <<"Computer ID " <<kompovi[i].comp_id << " COMPUTER IP " << kompovi[i].comp_ip << " COMPUTER PORT " << kompovi[i].comp_port << " COMPUTER SYSTEM " << kompovi[i].comp_os << " COMPUTER LOCATION " << kompovi[i].comp_location << endl;
- }
- }
- /////////////////////////////
- void Scan(){
- ScanAnimation();
- ScanResult();
- }
- void NmapAnimation(){
- cout<< "Executing.";
- Sleep(3000);
- cout<< ".";
- Sleep(3000);
- cout<<".";
- Sleep(3000);
- }
- void NmapResult(){
- int i;
- cout << "Looking for OS..."<<endl;
- for(i=0;i<NCOMPUTERS;i++){
- if(kompovi[i].comp_ip == TARGET_IP){
- TARGET_OS = kompovi[i].comp_os;
- }
- }
- Interface();
- }
- void Nmap(){
- NmapAnimation();
- NmapResult();
- }
- void ExploitDB(){
- }
- void Exploit(){}
- void EncryptAnimation(int repeat){
- int i;
- for(i=0;i<repeat;i++){
- cout <<"0011010111001010"<<endl;
- Sleep(500);
- cout <<"0100010011001010"<<endl;
- Sleep(500);
- cout <<"0001001001001001"<<endl;
- Sleep(500);
- cout <<"0000111010010100"<<endl;
- Sleep(500);
- cout <<"0100100100100101"<<endl;
- }
- }
- void DarkShopAnimation(){
- cout << "Connecting to http://pwoah7foa6au2pul.onion/.php?aff=41211.";
- Sleep(3000);
- cout << ".";
- Sleep(3000);
- cout << "."<<endl;
- Sleep(3000);
- cout << "Connected, encrypting connection..."<<endl;
- EncryptAnimation(5);
- }
- void DarkShopStore(){
- GameText(6);
- GameText(7);
- }
- void DarkShop(){
- DarkShopAnimation();
- cout << "Encripting Sucessfull."<<endl;
- Sleep(3000);
- system("CLS");
- DarkShopStore();
- }
- //############################################################
- void DisplayMain(){
- system("CLS");
- GameText(2); //SKYNET
- GameText(5);//CASH
- GameText(3); //TARGET IP/PORT
- GameText(1); //COMMANDS
- }
- void Interface(){ //GLAVNO ZA INPUT
- string input;
- DisplayMain();
- while(true){
- cin >> input;
- InputAlgoritam(input);
- }
- }
- void InputAlgoritam(string input){
- if(input == "ping"){
- Ping();
- }
- else if(input == "target") {
- TargetIP();
- }
- else if(input == "scan") {
- Scan();
- }
- else if(input == "nmap") {
- Nmap();
- }
- else if(input == "exploitdb"){
- ExploitDB();
- }
- else if(input == "exploit") {
- Exploit();
- }
- else if(input == "darkshop"){
- DarkShop();
- }
- }
- void LogInSucess(){
- cout << "LOGIN SUCESSFUL. WELCOME TO SKYNET CONSOLE" << endl;
- system("CLS");
- Interface();
- }
- void LogIn(){
- string uname,upass;
- GameText(2);
- cout << "USERNAME: ";
- cin >> uname;
- cout << "PASSWORD: ";
- cin >> upass;
- if(uname == "admin" && upass == "admin"){
- LogInSucess();
- }
- else {
- cout << "BAD LOGIN" << endl;
- return LogIn();
- }
- }
- //#################################################
- //STREAM FILE
- void ReadIPFile(){
- int i;
- ifstream ipfile;
- string line;
- ipfile.open("ipfile.txt");
- if(ipfile.is_open()){
- for(i=0;i<10;i++){
- ipfile >> COMP_IPS[i];
- }
- }
- }
- ////////////////////////////////////////////////
- int main(){
- TARGET_IP = "000.000.0.0";
- TARGET_PORT = 0;
- MONEY = 1000;
- ReadIPFile(); //ISCITAVA AJPIJEVE
- MakeComputers(); //PRAVI KOMPJUTENS
- //DisplayComputers(); //DEBAG
- CreateExploits();
- DisplayExploits();
- Initgame();
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement