-
Notifications
You must be signed in to change notification settings - Fork 0
/
check_flag.cpp
23 lines (20 loc) · 6.15 KB
/
check_flag.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#include <bits/stdc++.h>
#include <string>
#include <iostream>
#include "CustomVM.h"
using namespace std;
CustomVM customVM;
int main() {
char* input = (char *)malloc(100);
cout << endl << "************************************************** Welcome to my flag checker program! **************************************************" << endl;
cout << endl;
cout << "All you need to do is enter a flag. If it is a valid flag, I will be very happy!!! :)" << endl;
cout << endl << "Please enter your flag now: ";
cin >> input;
customVM.setRam(input);
if(customVM.execute({101, 228, 402, 498, 456, 378, 408, 408, 402, 390, 492, 402, 396, 486, 522, 450, 468, 378, 492, 420, 426, 528, 402, 396, 426, 486, 390, 462, 504, 402, 480, 402, 396, 378, 492, 456, 462, 378, 450, 390, 462, 456, 504, 426, 390, 492, 426, 462, 456, 468, 480, 426, 456, 390, 426, 468, 444, 402, 486, 72, 222, 426, 480, 444, 420, 378, 450, 504, 402, 480, 522, 420, 462, 510, 522, 402, 492, 420, 426, 444, 444, 408, 462, 498, 480, 486, 420, 462, 510, 72, 258, 402, 402, 492, 444, 378, 426, 456, 462, 456, 420, 402, 462, 456, 444, 522, 486, 426, 528, 402, 72, 192, 480, 378, 456, 390, 420, 402, 396, 444, 402, 378, 480, 456, 426, 456, 414, 486, 462, 486, 498, 384, 432, 402, 390, 492, 486, 450, 426, 486, 492, 480, 402, 486, 486, 396, 462, 378, 468, 468, 402, 492, 426, 492, 402, 432, 402, 456, 456, 426, 456, 414, 486, 384, 402, 426, 456, 72, 210, 486, 492, 402, 402, 450, 486, 498, 468, 444, 378, 486, 492, 426, 456, 414, 456, 462, 504, 426, 444, 444, 378, 414, 402, 450, 462, 480, 456, 426, 456, 414, 396, 462, 462, 408, 408, 426, 390, 402, 486, 72, 294, 402, 492, 492, 444, 402, 396, 510, 426, 486, 420, 426, 456, 414, 378, 384, 426, 444, 426, 492, 522, 450, 498, 486, 426, 390, 378, 444, 450, 378, 522, 378, 456, 462, 492, 420, 402, 480, 486, 402, 492, 378, 414, 402, 72, 204, 426, 450, 426, 456, 498, 492, 426, 462, 456, 450, 522, 378, 468, 378, 480, 492, 450, 402, 456, 492, 486, 420, 402, 378, 492, 492, 378, 390, 420, 450, 402, 456, 492, 426, 486, 402, 456, 492, 480, 402, 378, 492, 426, 402, 486, 378, 456, 456, 462, 498, 456, 390, 426, 456, 414, 402, 486, 492, 426, 450, 378, 492, 426, 456, 414, 72, 186, 456, 396, 492, 462, 492, 378, 444, 444, 402, 378, 486, 492, 420, 402, 480, 492, 510, 462, 510, 420, 462, 486, 402, 414, 480, 402, 378, 492, 420, 378, 486, 510, 420, 426, 390, 420, 72, 264, 402, 378, 492, 468, 378, 426, 456, 408, 462, 480, 450, 402, 378, 492, 486, 402, 456, 492, 486, 402, 516, 414, 462, 462, 396, 510, 402, 402, 438, 72, 252, 402, 396, 426, 456, 486, 492, 480, 498, 450, 402, 456, 492, 486, 402, 456, 492, 426, 450, 402, 456, 492, 486, 486, 420, 402, 486, 426, 450, 468, 444, 426, 390, 426, 492, 522, 72, 186, 396, 504, 378, 456, 390, 402, 396, 402, 516, 492, 402, 456, 396, 402, 396, 396, 462, 498, 384, 492, 408, 498, 444, 420, 402, 420, 402, 384, 444, 402, 486, 486, 426, 456, 414, 492, 462, 414, 402, 492, 420, 402, 480, 72, 234, 456, 492, 480, 462, 396, 498, 390, 402, 396, 408, 378, 480, 444, 378, 510, 414, 378, 522, 390, 462, 456, 486, 426, 396, 402, 480, 402, 396, 408, 480, 402, 474, 498, 402, 456, 492, 444, 522, 402, 456, 492, 480, 402, 378, 492, 426, 402, 486, 396, 426, 408, 408, 426, 390, 498, 444, 492, 522, 72, 210, 378, 492, 420, 426, 450, 408, 462, 498, 480, 378, 480, 402, 480, 426, 390, 420, 456, 462, 480, 390, 378, 444, 450, 72, 192, 522, 378, 456, 468, 378, 390, 438, 378, 414, 402, 486, 480, 402, 432, 462, 426, 390, 402, 396, 402, 516, 402, 480, 390, 426, 486, 402, 72, 300, 462, 462, 498, 414, 420, 492, 462, 456, 378, 450, 450, 378, 480, 480, 522, 480, 462, 462, 450, 486, 396, 462, 498, 384, 492, 450, 498, 486, 426, 390, 72, 258, 402, 456, 492, 426, 462, 456, 402, 456, 492, 402, 480, 402, 396, 378, 456, 492, 420, 480, 462, 498, 414, 420, 390, 462, 450, 468, 378, 456, 522, 378, 486, 72, 306, 468, 378, 480, 480, 426, 504, 402, 396, 456, 462, 468, 378, 426, 456, 408, 498, 444, 384, 402, 492, 510, 402, 402, 456, 72, 234, 492, 396, 402, 390, 444, 378, 480, 402, 396, 426, 486, 468, 480, 462, 486, 468, 402, 390, 492, 378, 456, 426, 456, 486, 426, 486, 492, 402, 396, 468, 444, 402, 378, 486, 498, 480, 402, 72, 318, 378, 480, 450, 444, 522, 444, 426, 492, 492, 444, 402, 384, 402, 408, 462, 480, 402, 390, 462, 498, 486, 426, 456, 486, 498, 486, 486, 402, 516, 402, 456, 492, 426, 480, 402, 450, 402, 456, 486, 402, 492, 72, 192, 444, 402, 486, 486, 426, 456, 414, 426, 492, 444, 378, 396, 522, 486, 420, 426, 468, 462, 456, 486, 402, 456, 486, 426, 384, 444, 402, 432, 498, 396, 414, 450, 402, 456, 492, 486, 402, 492, 492, 444, 426, 456, 414, 462, 498, 492, 510, 402, 426, 414, 420, 72, 318, 462, 480, 486, 402, 444, 426, 456, 402, 456, 378, 456, 462, 408, 390, 426, 504, 426, 444, 432, 462, 438, 402, 486, 444, 402, 378, 504, 402, 462, 408, 408, 402, 480, 72, 276, 378, 480, 492, 426, 402, 486, 378, 444, 444, 390, 444, 462, 492, 420, 402, 486, 480, 402, 450, 462, 504, 378, 444, 390, 420, 402, 402, 480, 402, 396, 390, 378, 444, 444, 426, 456, 414, 468, 480, 498, 396, 402, 456, 492, 420, 402, 480, 72, 186, 456, 396, 480, 402, 486, 426, 396, 402, 456, 390, 402, 408, 462, 480, 450, 402, 492, 492, 420, 402, 402, 486, 492, 426, 450, 378, 384, 444, 402, 396, 426, 486, 468, 462, 486, 426, 456, 414, 72, 258, 402, 378, 456, 426, 408, 420, 402, 492, 420, 402, 522, 384, 402, 402, 456, 456, 462, 420, 462, 444, 396, 450, 480, 72, 234, 486, 378, 492, 450, 498, 390, 420, 396, 462, 450, 378, 396, 402, 492, 462, 462, 438, 420, 402, 444, 396, 420, 402, 444, 468, 72, 252, 378, 492, 492, 402, 480, 468, 402, 480, 486, 462, 456, 378, 450, 486, 402, 390, 498, 480, 402, 462, 408, 402, 486, 492, 378, 492, 402, 414, 402, 456, 426, 498, 486, 378, 492, 72, 101, 202, 22, 101, 203, 0, 101, 208, 1086, 102, 208, 203, 108, 204, 208, 109, 205, 203, 101, 206, 95, 103, 205, 206, 101, 206, 10, 104, 205, 206, 106, 204, 205, 101, 205, 1068, 101, 206, 1108, 107, 205, 206, 101, 205, 1, 102, 203, 205, 106, 202, 203, 101, 205, 1032, 101, 206, 1108, 107, 206, 205, 100, 50, 0, 190, 20, 210, 90, 60, 190, 0, 30, 60, 0, 210, 190, 20, 230, 60, 130, 100, 150, 80, 101, 205, 22, 106, 203, 205, 22})) {
cout << endl << "Congratulations, that's a valid flag!!!";
} else {
cout << endl << "Hmmm, sorry, that's an invalid flag. Please try again!";
}
}