Rating:
we're given a java code that has the flag encoded by its custom encoding functions, or scramblers I might say.
the code (editied by me a bit) is as follow:
```
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner myObj = new Scanner(System.in);
System.out.print("Enter Flag: ");
String YourFlag = myObj.nextLine();
String OurWiredFlag="↳᨟ᅨᅨ├⌷ᭂᅨ⌷⚠69524⯮68187⌷ᦾ⮍⣦⌷⩪68187⯮65513⣦76209≵";
/* my addend code */
/* print the list as integer list */
char[] arr = OurWiredFlag.toCharArray();
for (int i=0; i < arr.length; i++) {
System.out.print(String.valueOf((int)arr[i]) + ", ");
}
System.out.println("");
/* end of my addend code */
if(encode(mess(YourFlag)).equals(OurWiredFlag)){
System.out.println("RaziCTF{"+YourFlag+"}");
System.out.println("here is the flag take it :)");
}
else {
System.out.println("Try more you can do it!");
}
}
public static String clean(String str){
/*can you help clean my mess it will help you with flag :)*/
return null;
}
public static String mess(String str){
char a[]=str.toCharArray();
int b=a.length;
char fin[]=new char[b];
int i=0;
int j=1;
int k=0;
while (true){
try {
if (i%2==0){
fin[(b/2)-k]=a[i];
k++;
}else if (i%2==1){
fin[(b/2)+j]=a[i];
j++;
}
else {
fin[i]= (char) (a[i]%5);
}
i++;
}catch (Exception e) {
return Arrays.toString(a);
}
}
}
public static boolean CHECK(char str){
int[] a=new int[10];
for (int i=0;i<10;i++){
a[i]=i+1;
}
try {
int i=0;
while (true){
i++;
String b=String.valueOf(str);
String c=String.valueOf(a[i-1]);
if(b.equals(c)){
return true;
}
}
}catch (Exception ex){
return false;
}
}
public static String decode(String str){
/*I really wanted to decode this thing but i really didn't feel like it :D */
return null;
}
public static String encode(String str){
StringBuilder fin= new StringBuilder();
for (int i=0; i