catf1ag CTF
class
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37
| import java.util.ArrayList; import java.util.Scanner;
public class Reverse { public static void main(final String[] array) { final Scanner scanner = new Scanner(System.in); System.out.println("Please input the flag \uff1a"); final String next = scanner.next(); System.out.println("Your input is \uff1a"); System.out.println(next); Encrypt(next.toCharArray()); }
public static void Encrypt(final char[] array) { final ArrayList<Integer> list = new ArrayList<Integer>(); for (int i = 0; i < array.length; ++i) { list.add(array[i] + '@' ^ 0x20); } final int[] array2 = { 131, 129, 148, 134, 140, 129, 135, 155, 138, 129, 150, 129, 191, 133, 129, 147, 153, 191, 133, 129, 147, 153, 157 }; final ArrayList<Integer> o = new ArrayList<Integer>(); for (int j = 0; j < array2.length; ++j) { o.add(array2[j]); } System.out.println("Result:"); if (list.equals(o)) { System.out.println("Congratulations\uff01"); } else { System.err.println("Error\uff01"); } } }
|
简单
1 2 3 4 5 6
| data=[ 131, 129, 148, 134, 140, 129, 135, 155, 138, 129, 150, 129, 191, 133, 129, 147, 153, 191, 133, 129, 147, 153, 157 ] for i in range(len(data)): data[i]^=0x20 data[i]-=ord('@') print(''.join(chr(x)for x in data))
|
easy_python
exe打包的py
pyinstxtractor转成pyc
pyinstxtractor.py
完成之后将文件夹内的struct.pyc 前十六个字节copy到产出的pyc内,E3 前的是文件头。抄过去

然后

换掉

丢给uncomplye6或者网站(一样的。。)
python反编译 - 在线工具 (tool.lu)

flag not here?
怎么可能捏
实际上就是这个flag
就俩re题。。。
太简单了。。。