TripleX S2-29 - Final Showcase

Well it looks like its time for you to enter the field Agent. Dont forget to ensure you have the loadout kit on you just incase. Our D3B0G software could be invaluable if something goes wrong out there.

Program

#include <iostream>
#include <ctime>

void PrintIntroduction(int Difficulty)
{
    //Output text to console to introduce the situation to user
    std::cout << "\n\ntasc> Agent, it looks like the target has detected our remote connection...\n";
    std::cout << "tasc> You have to take over cracking their Tier " << Difficulty;
    std::cout << " security codes - Just be sure to follow the D3B0G onscreen-\n\n";
    std::cout << "REMOTE SESSION TERMINATED...\n\n";
    std::cout << "Server X01-205A Re-initiating...\n\n";
    std::cout << "===D3B0G Injection Initializing===\n";
    std::cout << "_____ ___________  _____ _____\n";
    std::cout << "|  _  \\____ | ___ \\|  _  |  __ \\\n";
    std::cout << "| | | |   / / |_/ /| |/' | |  \\/\n";
    std::cout << "| | | |   \\ \\ ___ \\|  /| | | __ \n";
    std::cout << "| |/ /.___/ / |_/ /\\ |_/ / |_\\ \\\n";
    std::cout << "|___/ \\____/\\____/  \\___/ \\____/\n";
    std::cout << "v22.01.23\n\n";

    std::cout << "Please enter security authentication...\n";
}

void PrintDifficulty(int Difficulty)
{
    std::cout << "\n\nD3B0G> Current Tier to breach: " << Difficulty;
    std::cout << "\n\n";
}

void PrintGameWin()
{
    std::cout << "D3B0G> Code breach successful!\n\n";
    std::cout << "X01-205A login successful\n";
    std::cout << "X01-205A> /mnt/D3B0G/DataTransfer\n";
    std::cout << "X01-205A> D3B0G-Transfer initiated...\n";
    std::cout << "X01-205A> D3B0G-Transfer Complete! - Return data to personnel for analysis.\n";
}

void PrintLevelWin()
{
    std::cout << "\n\nD3B0G> Security Layer code breach successful!\n";
    std::cout << "D3B0G> Proceeding to next code layer\n";
}

void PrintLevelLoss()
{
    std::cout << "D3B0G> Invalid code entry - System Lockout detect~\n";
    std::cout << "sys-security> Security breach attempt detected! Initializing Data Wipe... Initial~\n";
    std::cout << "D3B0G> Reinjection successful - System lockout averted!\n";
    std::cout << "\n\nD3B0G> Reattempt initializing...";
}

bool PlayGame(int Difficulty)
{   
    PrintDifficulty(Difficulty);
    
    int IntegerCodeA = rand() % Difficulty + Difficulty;
    int IntegerCodeB = rand() % Difficulty + Difficulty;
    int IntegerCodeC = rand() % Difficulty + Difficulty;

    int IntegerCodeSum = IntegerCodeA + IntegerCodeB + IntegerCodeC;
    int IntegerCodeProd = IntegerCodeA * IntegerCodeB * IntegerCodeC;

    //Output details of above variables to console for user to be informed about relevant data
    std::cout << "D3B0G> Analyzing security hashes...\n";
    std::cout << "D3B0G> Analysis: There are 3 numbers in the code\n";
    std::cout << "D3B0G> The numbers add-up to          : " << IntegerCodeSum;
    std::cout << "\nD3B0G> The number multiply together to: " << IntegerCodeProd;
    std::cout << "\n\nD3B0G> Enter the three numbers each separated by space: ";
    
    //Store player guesses
    int PlayerGuessCodeA, PlayerGuessCodeB, PlayerGuessCodeC;

    std::cin >> PlayerGuessCodeA >> PlayerGuessCodeB >> PlayerGuessCodeC;

    int PlayerGuessSum = PlayerGuessCodeA + PlayerGuessCodeB + PlayerGuessCodeC;
    int PlayerGuessProduct = PlayerGuessCodeA * PlayerGuessCodeB * PlayerGuessCodeC;

    //Check player guess against expected
    if (PlayerGuessSum == IntegerCodeSum && PlayerGuessProduct == IntegerCodeProd)
    {
        PrintLevelWin();
        return true;
    }
    else
    {
        PrintLevelLoss();
        return false;
    }
}

int main()
{
    srand(time(NULL));
    
    int LevelDifficulty = 1;
    const int MaxLevel = 5;

    PrintIntroduction(LevelDifficulty);

    while (LevelDifficulty <= MaxLevel) //Loop all levels until max level completed
    {
        bool bLevelComplete = PlayGame(LevelDifficulty);
        std::cin.clear();
        std::cin.ignore();

        if (bLevelComplete)
        {
            ++LevelDifficulty;
        }
    }
    PrintGameWin();
    return 0;
}

OUTPUT

tasc> Agent, it looks like the target has detected our remote connection...
tasc> You have to take over cracking their Tier 1 security codes - Just be sure to follow the D3B0G onscreen-

REMOTE SESSION TERMINATED...

Server X01-205A Re-initiating...

===D3B0G Injection Initializing===
_____ ___________  _____ _____
|  _  \____ | ___ \|  _  |  __ \
| | | |   / / |_/ /| |/' | |  \/
| | | |   \ \ ___ \|  /| | | __
| |/ /.___/ / |_/ /\ |_/ / |_\ \
|___/ \____/\____/  \___/ \____/
v22.01.23

Please enter security authentication...


D3B0G> Current Tier to breach: 1

D3B0G> Analyzing security hashes...
D3B0G> Analysis: There are 3 numbers in the code
D3B0G> The numbers add-up to          : 3
D3B0G> The number multiply together to: 1

D3B0G> Enter the three numbers each separated by space: 1 1 1


D3B0G> Security Layer code breach successful!
D3B0G> Proceeding to next code layer


D3B0G> Current Tier to breach: 2

D3B0G> Analyzing security hashes...
D3B0G> Analysis: There are 3 numbers in the code
D3B0G> The numbers add-up to          : 9
D3B0G> The number multiply together to: 27

D3B0G> Enter the three numbers each separated by space: 3 3 3


D3B0G> Security Layer code breach successful!
D3B0G> Proceeding to next code layer


D3B0G> Current Tier to breach: 3

D3B0G> Analyzing security hashes...
D3B0G> Analysis: There are 3 numbers in the code
D3B0G> The numbers add-up to          : 11
D3B0G> The number multiply together to: 45

D3B0G> Enter the three numbers each separated by space: 5 3 3


D3B0G> Security Layer code breach successful!
D3B0G> Proceeding to next code layer


D3B0G> Current Tier to breach: 4

D3B0G> Analyzing security hashes...
D3B0G> Analysis: There are 3 numbers in the code
D3B0G> The numbers add-up to          : 13
D3B0G> The number multiply together to: 80

D3B0G> Enter the three numbers each separated by space: 4 4 5 


D3B0G> Security Layer code breach successful!
D3B0G> Proceeding to next code layer


D3B0G> Current Tier to breach: 5

D3B0G> Analyzing security hashes...
D3B0G> Analysis: There are 3 numbers in the code
D3B0G> The numbers add-up to          : 21
D3B0G> The number multiply together to: 320

D3B0G> Enter the three numbers each separated by space: 0 0 0
D3B0G> Invalid code entry - System Lockout detect~
sys-security> Security breach attempt detected! Initializing Data Wipe... Initial~
D3B0G> Reinjection successful - System lockout averted!


D3B0G> Reattempt initializing...

D3B0G> Current Tier to breach: 5

D3B0G> Analyzing security hashes...
D3B0G> Analysis: There are 3 numbers in the code
D3B0G> The numbers add-up to          : 19
D3B0G> The number multiply together to: 252

D3B0G> Enter the three numbers each separated by space: 7 6 6


D3B0G> Security Layer code breach successful!
D3B0G> Proceeding to next code layer
D3B0G> Code breach successful!

X01-205A login successful
X01-205A> /mnt/D3B0G/DataTransfer
X01-205A> D3B0G-Transfer initiated...
X01-205A> D3B0G-Transfer Complete! - Return data to personnel for analysis.
2 Likes

Congratulations on your game :partying_face:

Privacy & Terms