QQ安卓浏览器过签名验证方法.
本帖最后由 Shizev 于 2018-3-11 17:49 编辑重新打包签名会出现这个,调用的是默认浏览器.
打开工具搜索/mh?from=juggled
双击进入,自己滑轮向上滑几下来到下面代码处.
.method private static a(Ljava/lang/StringBuffer;)Z
.locals 5
const/4 v1, 0x0
const/4 v0, 0x1
:try_start_0
invoke-static {}, Lcom/tencent/mtt/ContextHolder;->getAppContext()Landroid/content/Context;
move-result-object v2
if-nez v2, :cond_1
:cond_0
:goto_0
return v0
:cond_1
invoke-virtual {v2}, Landroid/content/Context;->getPackageName()Ljava/lang/String;
move-result-object v3
const/16 v4, 0x40
invoke-static {v3, v2, v4}, Lcom/tencent/mtt/base/utils/s;->a(Ljava/lang/String;Landroid/content/Context;I)Landroid/content/pm/PackageInfo;
move-result-object v2
if-eqz v2, :cond_0
iget-object v2, v2, Landroid/content/pm/PackageInfo;->signatures:[Landroid/content/pm/Signature;
const-string/jumbo v3, ""
if-eqz v2, :cond_0
array-length v3, v2
if-lez v3, :cond_0
const/4 v3, 0x0
aget-object v2, v2, v3
invoke-virtual {v2}, Landroid/content/pm/Signature;->toCharsString()Ljava/lang/String;
move-result-object v2
if-eqz p0, :cond_2
invoke-virtual {p0, v2}, Ljava/lang/StringBuffer;->append(Ljava/lang/String;)Ljava/lang/StringBuffer;
:cond_2
if-eqz v2, :cond_3
invoke-static {}, Lcom/tencent/mtt/boot/browser/f;->D()Ljava/lang/String;
move-result-object v3
invoke-virtual {v2, v3}, Ljava/lang/String;->equalsIgnoreCase(Ljava/lang/String;)Z
:try_end_0
.catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0
move-result v2
if-nez v2, :cond_0
:cond_3
move v0, v1
goto :goto_0
:catch_0
move-exception v1
goto :goto_0
.end method
.method private d(I)V
.locals 1
iget-object v0, p0, Lcom/tencent/mtt/boot/browser/f;->a:Lcom/tencent/mtt/boot/browser/f$a;
iput p1, v0, Lcom/tencent/mtt/boot/browser/f$a;->d:I
return-void
.end method
.method public static g(Landroid/app/Activity;)V
.locals 7
new-instance v0, Ljava/lang/StringBuffer;
invoke-direct {v0}, Ljava/lang/StringBuffer;-><init>()V
invoke-static {v0}, Lcom/tencent/mtt/boot/browser/f;->a(Ljava/lang/StringBuffer;)Z
move-result v1
if-nez v1, :cond_0 //if - nez V1,改为goto 就好了.我也不懂代码.试了试这么改可以.我就这么写了.
const-string/jumbo v3, "android.intent.action.VIEW"
const-string/jumbo v1, "http://mdc.html5.qq.com/mh?from=juggled"
:try_start_0
invoke-virtual {v0}, Ljava/lang/StringBuffer;->toString()Ljava/lang/String;
move-result-object v2
sget-object v0, Lcom/tencent/mtt/AppInfoHolder$AppInfoID;->APP_INFO_CURRENT_CHANNEL_ID:Lcom/tencent/mtt/AppInfoHolder$AppInfoID;
invoke-static {v0}, Lcom/tencent/mtt/AppInfoHolder;->getAppInfoByID(Lcom/tencent/mtt/AppInfoHolder$AppInfoID;)Ljava/lang/String;
move-result-object v4
const-string/jumbo v5, ""
const-string/jumbo v0, ""
invoke-static {v2}, Landroid/text/TextUtils;->isEmpty(Ljava/lang/CharSequence;)Z
move-result v6
if-nez v6, :cond_1
invoke-static {v2}, Lcom/tencent/common/utils/Md5Utils;->getMD5(Ljava/lang/String;)Ljava/lang/String;
move-result-object v0
move-object v2, v0
:goto_0
new-instance v0, Ljava/lang/StringBuilder;
invoke-direct {v0}, Ljava/lang/StringBuilder;-><init>()V
const-string/jumbo v6, "http://mdc.html5.qq.com/mh?from=juggled&version=8.2&buildid=3950&channel="
invoke-virtual {v0, v6}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v0
invoke-virtual {v0, v4}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v0
const-string/jumbo v4, "&devicename="
invoke-virtual {v0, v4}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v0
sget-object v4, Landroid/os/Build;->MODEL:Ljava/lang/String;
invoke-virtual {v4}, Ljava/lang/String;->trim()Ljava/lang/String;
move-result-object v4
invoke-virtual {v4}, Ljava/lang/String;->toLowerCase()Ljava/lang/String;
move-result-object v4
invoke-virtual {v0, v4}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v0
const-string/jumbo v4, "&sdkversion="
invoke-virtual {v0, v4}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v0
invoke-static {}, Lcom/tencent/mtt/base/utils/g;->y()I
move-result v4
invoke-virtual {v0, v4}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;
move-result-object v0
const-string/jumbo v4, "&lc="
invoke-virtual {v0, v4}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v4
invoke-static {}, Lcom/tencent/mtt/qbcontext/core/QBContext;->a()Lcom/tencent/mtt/qbcontext/core/QBContext;
move-result-object v0
const-class v6, Lcom/tencent/mtt/businesscenter/facade/IConfigService;
invoke-virtual {v0, v6}, Lcom/tencent/mtt/qbcontext/core/QBContext;->a(Ljava/lang/Class;)Ljava/lang/Object;
move-result-object v0
check-cast v0, Lcom/tencent/mtt/businesscenter/facade/IConfigService;
invoke-interface {v0}, Lcom/tencent/mtt/businesscenter/facade/IConfigService;->getLC()Ljava/lang/String;
move-result-object v0
invoke-virtual {v4, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v0
const-string/jumbo v4, "&keymd5="
invoke-virtual {v0, v4}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v0
invoke-virtual {v0, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v0
const-string/jumbo v2, "&imei="
invoke-virtual {v0, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v0
invoke-virtual {v0, v5}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v0
invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
:try_end_0
.catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0
move-result-object v0
:try_start_1
invoke-static {v0}, Landroid/net/Uri;->parse(Ljava/lang/String;)Landroid/net/Uri;
move-result-object v1
new-instance v2, Landroid/content/Intent;
invoke-direct {v2}, Landroid/content/Intent;-><init>()V
if-eqz v1, :cond_0
invoke-static {v3}, Landroid/text/TextUtils;->isEmpty(Ljava/lang/CharSequence;)Z
move-result v4
if-nez v4, :cond_0
invoke-virtual {v2, v3}, Landroid/content/Intent;->setAction(Ljava/lang/String;)Landroid/content/Intent;
invoke-virtual {v2, v1}, Landroid/content/Intent;->setData(Landroid/net/Uri;)Landroid/content/Intent;
const-string/jumbo v1, "com.android.browser"
const-string/jumbo v4, "com.android.browser.BrowserActivity"
invoke-virtual {v2, v1, v4}, Landroid/content/Intent;->setClassName(Ljava/lang/String;Ljava/lang/String;)Landroid/content/Intent;
invoke-virtual {p0, v2}, Landroid/app/Activity;->startActivity(Landroid/content/Intent;)V
invoke-virtual {p0}, Landroid/app/Activity;->finish()V
invoke-static {}, Lcom/tencent/mtt/base/utils/e;->c()V
:try_end_1
.catch Ljava/lang/Exception; {:try_start_1 .. :try_end_1} :catch_2
:cond_0
:goto_1
return-void
:catch_0
move-exception v0
move-object v0, v1
:goto_2
:try_start_2
invoke-static {v0}, Landroid/net/Uri;->parse(Ljava/lang/String;)Landroid/net/Uri;
move-result-object v0
if-eqz v0, :cond_0
invoke-static {v3}, Landroid/text/TextUtils;->isEmpty(Ljava/lang/CharSequence;)Z
move-result v1
if-nez v1, :cond_0
new-instance v1, Landroid/content/Intent;
invoke-direct {v1}, Landroid/content/Intent;-><init>()V
invoke-virtual {v1, v3}, Landroid/content/Intent;->setAction(Ljava/lang/String;)Landroid/content/Intent;
invoke-virtual {v1, v0}, Landroid/content/Intent;->setData(Landroid/net/Uri;)Landroid/content/Intent;
invoke-virtual {p0, v1}, Landroid/app/Activity;->startActivity(Landroid/content/Intent;)V
invoke-virtual {p0}, Landroid/app/Activity;->finish()V
invoke-static {}, Lcom/tencent/mtt/base/utils/e;->c()V
:try_end_2
.catch Ljava/lang/Exception; {:try_start_2 .. :try_end_2} :catch_1
goto :goto_1
:catch_1
move-exception v0
goto :goto_1
:catch_2
move-exception v1
goto :goto_2
:cond_1
move-object v2, v0
goto/16 :goto_0
.end method 感谢楼主教程 涨姿势了,已经收藏学习,楼主辛苦. 感谢分享,楼主辛苦了 感谢楼主分享,这个会不会被人用来做坏事{:1_918:} 好东西,感谢分享。。。。 学习了,这个办法好啊 非常好的教程,应该很多读者都喜欢,谢谢分享!
好长一段代码。。。。没耐心看完了,只改了一个判断语句么? 看起来有点意思先研究一波去
感谢分享
页:
[1]
2