[Java] 纯文本查看 复制代码
//
// Decompiled by Jadx (from NP Manager)
//
package com.ctf.dadroid;
import android.os.Bundle;
import android.support.v7.app.ActionBarActivity;
import android.view.Menu;
import android.view.MenuItem;
import android.view.View;
import android.widget.EditText;
import android.widget.Toast;
import java.util.Arrays;
public class MainActivity extends ActionBarActivity {
private void crack(String str) {
char[] b = new char[]{'M', '=', '+', 198, 250, 192, 226, 254, 236, 232, 224, 233, 214, 227, 255, 171, 254, 209, 225, 255, 229, 205, 231, 252, 240, 201, 229, 253, 248, 246, 196, 250, 241, 255, 248, 255, 201, 195, 203, 197, 205, 199, 207, 201, 193, 203, 195, 205, 197, 207, 210};
System.out.println(b.length);
char[] c = str.toCharArray();
int l = c.length;
char m = c[l - 1];
for (int i = 0; i < l; i++) {
int i2 = (c[i] ^ m) & 255;
m = (char) (m + 1);
c[i] = (char) i2;
}
result(c, b);
}
private void result(char[] cArr, char[] cArr2) {
if (Arrays.equals(cArr, cArr2)) {
Toast.makeText(this, "yes", 1).show();
} else {
Toast.makeText(this, "no", 1).show();
}
}
public void confirm(View view) {
crack(((EditText) findViewById(2131296320)).getText().toString());
}
public boolean onOptionsItemSelected(MenuItem menuItem) {
return menuItem.getItemId() == 2131296321 ? true : super.onOptionsItemSelected(menuItem);
}
protected void onCreate(Bundle bundle) {
super.onCreate(bundle);
setContentView(2130968599);
}
public boolean onCreateOptionsMenu(Menu menu) {
getMenuInflater().inflate(2131558400, menu);
return true;
}
}