silmaulviel reverse tasks upload #1

Merged
Silmaulviel merged 6 commits from silmaulviel-tasks-1 into main 2023-06-17 12:43:43 +00:00
2 changed files with 32 additions and 0 deletions
Showing only changes of commit 35411f7b7d - Show all commits

View file

@ -0,0 +1,31 @@
#include <stdio.h>
#include <stdlib.h>
const int maxsize = 33;
char line[maxsize+1];
char ans[maxsize+1];
FILE * file;
void copying() {
for (int i = 0; i < maxsize; ++i) {
ans[i] = line[i];
}
}
void orexclusive() {
for (int i = 0; i < maxsize; i+=2, ans[i]^='^'-'|'+'&') {}
}
int main(int argc, char * argv[]) {
file = fopen("flag.txt", "r");
if (file == NULL)
printf("File does not exist!\n");
else {
fgets(line, maxsize+1, file);
copying();
orexclusive();
printf("%s\n", ans);
fclose(file);
}
return 0;
}

View file

@ -0,0 +1 @@
ctf{th1s_x0r_1s_s1mpl3}