-
-
[求助]请大牛看看这个CM的算法
-
发表于:
2012-7-20 19:03
6879
-
public class GoAheadCrackMe extends Activity
{
private int[] key;
public GoAheadCrackMe()
{
int[] arrayOfInt = { 32, 82, 33, 2, 248 };
this.key = arrayOfInt;
}
private boolean itsRight(String paramString)
{
int i = 0;
InputStream localInputStream;
try
{
String str1 = getResources().getString(2131034119);
localInputStream = getResources().getAssets().open(str1);
int j = 0;
int k = localInputStream.read();
int m;
if (k >= 0)
{
m = paramString.length();
int n = m;
if (j >= n)
if (localInputStream == null);
}
while (true)
{
try
{
localInputStream.close();
return i;
}
catch (IOException localIOException1)
{
StringBuilder localStringBuilder1 = new StringBuilder().append("IOException: ");
String str2 = localIOException1.toString();
String str3 = str2;
int i1 = Log.e("GoAheadCrackMe", str3);
continue;
}
int[] arrayOfInt = this.key;
int i2 = this.key.length;
int i3 = j % i2;
int i4 = (char)(arrayOfInt[i3] ^ k);
m = paramString.charAt(j);
int i5 = m;
if (i4 != i5)
{
if (localInputStream == null)
continue;
try
{
localInputStream.close();
}
catch (IOException localIOException2)
{
StringBuilder localStringBuilder2 = new StringBuilder().append("IOException: ");
String str4 = localIOException2.toString();
String str5 = str4;
int i6 = Log.e("GoAheadCrackMe", str5);
}
continue;
}
j += 1;
m = localInputStream.read();
k = m;
break;
i = 1;
if (localInputStream == null)
continue;
try
{
localInputStream.close();
}
catch (IOException localIOException3)
{
StringBuilder localStringBuilder3 = new StringBuilder().append("IOException: ");
String str6 = localIOException3.toString();
String str7 = str6;
int i7 = Log.e("GoAheadCrackMe", str7);
}
}
}
catch (IOException localIOException4)
{
while (true)
{
StringBuilder localStringBuilder4 = new StringBuilder().append("IOException: ");
String str8 = localIOException4.toString();
String str9 = str8;
int i8 = Log.e("GoAheadCrackMe", str9);
if (localInputStream == null)
continue;
try
{
localInputStream.close();
}
catch (IOException localIOException5)
{
StringBuilder localStringBuilder5 = new StringBuilder().append("IOException: ");
String str10 = localIOException5.toString();
String str11 = str10;
int i9 = Log.e("GoAheadCrackMe", str11);
}
}
}
finally
{
if (localInputStream == null);
}
try
{
localInputStream.close();
throw localObject;
}
catch (IOException localIOException6)
{
while (true)
{
StringBuilder localStringBuilder6 = new StringBuilder().append("IOException: ");
String str12 = localIOException6.toString();
String str13 = str12;
int i10 = Log.e("GoAheadCrackMe", str13);
}
}
}
初始化部分
定义一个int数组{0x20,0x52,0x21,0x2,0xf8}
boink.data的内容:
543a 4871 d857 3352 228c 4f3d 0167 9953
2b00
算法部分:
取int数组长度
取模运算
然后比较
我运算的出来的有些明显的不是字符,这样要怎么处理呢,这个的正真算法又是什么呢,
希望大牛分析下
[招生]科锐逆向工程师培训(2024年11月15日实地,远程教学同时开班, 第51期)