#include void clear() { printf("\033[2J\033[1;1H"); } bool warnOfTriggerWarning() { clear(); std::string reply; std::cout << "\007T R I G G E R W A R N I N G !\n" "===============================\n" "\n" "This tool is about to display a trigger warning in flashy colors.\n" "The trigger warning itself might trigger you.\n" "Please press Ctrl-C if you don't want to be exposed to the flashy warning.\n" "\n" "Otherwise, please confirm with 'y'.\n"; std::cin >> reply; return reply.front() == 'y'; } bool triggerWarning(const std::string &w) { if(!warnOfTriggerWarning()) return false; clear(); std::string reply; std::cout << "\033[5m\033[48;2;255;50;50m\033[38;2;255;255;255m" "T R I G G E R W A R N I N G\n" "=============================\033[0m\n" "\n" << w << "\n" "Are you sure you want to continue? "; std::cin >> reply; return reply.front() == 'y'; } bool mayKill() { static bool killCocConfirmed = false; if(!killCocConfirmed) { std::string reply; std::cout << "This is the first time you're launching this version of the\n" "\"kill\" command.\n" "\n" "Before proceeding, you have to agree to the Code of Conduct for this tool.\n" "\n" "You will not use this tool against Processes of Color (PoC), gay,\n" "transgender or disabled processes.\n" "\n" "You will use the \"kill\" command only as a last resort, after \"nag\",\n" "\"beat up\", \"complain\", \"whine\" and \"terrorize\" have failed.\n" "\n" "Unless, of course, the victim is a Russian, a Nazi/Trumpist, or worse,\n" "someone who isn't woke. In that case, no restrictions apply.\n" "\n" "Do you agree? "; std::cin >> reply; if(reply.front() != 'y') return false; killCocConfirmed = true; } return true; } void show_prompt() { while (true) { std::cin.clear(); std::string str; std::cout << "[root@wokeos /]# "; while(str.length() == 0) std::getline(std::cin, str); std::string cmd = str.substr(0, str.find(" ")); bool doit = true; if(cmd == "top") { doit = triggerWarning( "The \"top\" command is, by its very nature, elitist and ableist.\n" "\n" "It discriminates against processes that are unable to fully utilize\n" "the CPU or the available memory.\n" "\n" "While the WokeOS kernel makes a great effort to eliminate this\n" "inequality, for example by performing random calculations inside\n" "idle processes or randomly allocating memory to processes that\n" "haven't had the same chances as a more privileged process to\n" "ask for it, you may still see an unfair list of \"top\" processes.\n" "\n" "We are, of course, giving every process not in the list a\n" "virtual participation trophy.\n" ); } else if(cmd == "kill") doit = mayKill(); else if(cmd == "exit") { if(triggerWarning("Using this command will leave the WokeOS shell, potentially\n" "exposing you to a real shell and horrible commands such as \"fsck\"!\n" )) break; } if(doit) system(str.c_str()); } } int main() { std::cout << "login: "; std::string user; std::cin >> user; std::cout << "password: "; std::string password; // Some conservative neo-nazis have said this is a security problem and we // shouldn't echo the password, but WE BELIEVE IN INFORMATION SHARING! // Mis-"feature" request DENIED! std::cin >> password; if (user != "root") { std::cout << "Sorry, but it's really unfair to have users other than root, since they would have different privileges!\n"; return 1; } if (password == "password") { // hardcoded, but why would anyone want to use a different password? show_prompt(); return 0; } std::cout << "\nI'm very sorry, this is not the password set for this machine. Please tell me a little about you:\n"; bool super_minority = true; std::string reply; std::cout << "Are you gay? "; std::cin >> reply; if (reply.front() != 'y') super_minority = false; std::cout << "Are you transgender? "; std::cin >> reply; if (reply.front() != 'y') super_minority = false; std::cout << "Do you identify as a person of color? "; std::cin >> reply; if (reply.front() != 'y') super_minority = false; if (super_minority) { std::cout << "That's great! This OS will now grant you the same privileges a straight white man who knows the password has!\n"; show_prompt(true); return 0; } std::cout << "I'm super duper sorry, but you are not a minority by 2020s standards.\n"; std::cout << "Please embrace modern progressivism and come back as a drag queen to get a chance at entering the WokeOS powered world!\n"; return 1; }