diff --git a/src/common/common.cpp b/src/common/common.cpp index 00f2c5f2d..84eb85c8a 100644 --- a/src/common/common.cpp +++ b/src/common/common.cpp @@ -48,6 +48,7 @@ using namespace std; +#include "base64.h" #include "hacks.h" #include "mkvmerge.h" @@ -1359,6 +1360,16 @@ void engage_hacks(const char *hacks) { for (hidx = 0; mosu_hacks[hidx] != NULL; hidx++) mxinfo("%s\n", mosu_hacks[hidx]); mxexit(0); + } else if (engage_args[aidx] == "cow") { + const string initial = "ICAgICAgICAgIChfXykKICAgICAgICAgICgqKikg" + "IE9oIGhvbmV5LCB0aGF0J3Mgc28gc3dlZXQhCiAgIC8tLS0tLS0tXC8gICBPZiB" + "jb3Vyc2UgSSdsbCBtYXJyeSB5b3UhCiAgLyB8ICAgICB8fAogKiAgfHwtLS0tfH" + "wKICAgIF5eICAgIF5eCg=="; + char correction[200]; + memset(correction, 0, 200); + base64_decode(initial, (unsigned char *)correction); + mxinfo("%s", correction); + mxexit(0); } for (aidx = 0; aidx < engage_args.size(); aidx++) { valid_hack = false; diff --git a/src/mkvmerge.cpp b/src/mkvmerge.cpp index 8775e0b97..730cc1296 100644 --- a/src/mkvmerge.cpp +++ b/src/mkvmerge.cpp @@ -1610,6 +1610,11 @@ parse_args(int argc, outfile = safestrdup(next_arg); i++; + } else if (!strcmp(this_arg, "--engage")) { + if (next_arg == NULL) + mxerror("'--engage' lacks its argument.\n"); + engage_hacks(next_arg); + i++; } } @@ -1628,19 +1633,14 @@ parse_args(int argc, // Ignore the options we took care of in the first step. if (!strcmp(this_arg, "-o") || !strcmp(this_arg, "--output") || - !strcmp(this_arg, "--command-line-charset")) { + !strcmp(this_arg, "--command-line-charset") || + !strcmp(this_arg, "--engage")) { i++; continue; } // Global options - if (!strcmp(this_arg, "--engage")) { - if (next_arg == NULL) - mxerror("'--engage' lacks its argument.\n"); - engage_hacks(next_arg); - i++; - - } else if (!strcmp(this_arg, "--priority")) { + if (!strcmp(this_arg, "--priority")) { bool found; if (next_arg == NULL)