最喜欢 Java 逆向了,反编译出来的真的很美观对吧
public void onClick(View v) { int flag = 1; String xx = editview.getText().toString(); flag = (xx.length() == 32 && xx.charAt(31) == 'a' && xx.charAt(1) == 'b' && (xx.charAt(0) + xx.charAt(2)) + (-48) == 56) ? 0 : 0; if (flag == 1) { char[] x = "dd2940c04462b4dd7c450528835cca15".toCharArray(); x[2] = (char) ((x[2] + x[3]) - 50); x[4] = (char) ((x[2] + x[5]) - 48); x[30] = (char) ((x[31] + x[9]) - 48); x[14] = (char) ((x[27] + x[28]) - 97); for (int i = 0; i < 16; i++) { char a = x[31 - i]; x[31 - i] = x[i]; x[i] = a; } String bbb = String.valueOf(x); textview.setText("flag{" + bbb + "}"); return; } textview.setText("输入注册码错误"); }
|
关键代码就在于对 dd2940c04462b4dd7c450528835cca15
的处理,我们只需要将这段代码跑出来就知道了,很轻松对吧
x = list("dd2940c04462b4dd7c450528835cca15")
x[2] = chr(ord(x[2]) + ord(x[3]) - 50) x[4] = chr(ord(x[2]) + ord(x[5]) - 48) x[30] = chr(ord(x[31]) + ord(x[9]) - 48) x[14] = chr(ord(x[27]) + ord(x[28]) - 97)
for i in range(16): a = chr(ord(x[31-i])) x[31 - i] = x[i] x[i] = a
print("flag{%s}" % "".join(x))
|
最后得出来的结果是 flag{59acc538825054c7de4b26440c0999dd}