这两段是搜狗手机输入法2.0校验MD5的代码,我想……你懂的
public static String getMD5Data(byte[] paramArrayOfByte)
{
try
{
Object localObject1 = MessageDigest.getInstance("MD5");
((MessageDigest)localObject1).update(paramArrayOfByte);
localObject1 = a(((MessageDigest)localObject1).digest()).toLowerCase();
localObject1 = localObject1;
return localObject1;
}
catch (Exception localObject2)
{
while (true)
{
localException.getMessage();
Object localObject2 = null;
}
}
}
这是用dex2jar和jd-gui得到的
.method public static getMD5Data([B)Ljava/lang/String;
.registers 2
:try_start_0
const-string v0, "MD5"
invoke-static {v0}, Ljava/security/MessageDigest;->getInstance(Ljava/lang/String;)Ljava/security/MessageDigest;
move-result-object v0
invoke-virtual {v0, p0}, Ljava/security/MessageDigest;->update([B)V
invoke-virtual {v0}, Ljava/security/MessageDigest;->digest()[B
move-result-object v0
invoke-static {v0}, Lcom/sohu/inputmethod/settings/SettingManager$EncryptUtil;->a([B)Ljava/lang/String;
move-result-object v0
invoke-virtual {v0}, Ljava/lang/String;->toLowerCase()Ljava/lang/String;
:try_end_14
.catch Ljava/lang/Exception; {:try_start_0 .. :try_end_14} :catch_16
move-result-object v0
:goto_15
return-object v0
:catch_16
move-exception v0
invoke-virtual {v0}, Ljava/lang/Exception;->getMessage()Ljava/lang/String;
const/4 v0, 0x0
goto :goto_15
.end method
这是用baksmali.jar得到*.samli
两段代码表达的意思应该是一样的,后面的是dalvik_opcodes,那位大大能帮我解释一下。
通过前面的我知道它是先try一下,出错了就执行catch (Exception localObject2),而Object localObject2 = null 所以程序会无法运行,那么怎么修改下面的(注意是下面一段代码.因为可以回编译),欺骗程序,使try出错时也能运行,或者使try不要出错~!
小弟已经研究好几天了,跪求解决方案呀~!!!!!!!!!
[培训]内核驱动高级班,冲击BAT一流互联网大厂工作,每周日13:00-18:00直播授课