枯寂入秋

2018-05-29 09:15:13 -0400

强制更新教程

1.收藏代码--放置到QQ收藏 [公告】

{NOTICE:

[TITLE:【公告】:END]

[MESSAGE:这只是一个测试,为了实验强制更新

:END]

[BUTTON:联系作者:END]

[OPENURL:mqqapi://card/show_pslcard?uin=961755167:END]

[BUTTON1:朕知道了:END]

[OPENURL1::END]

[BUTTON2:进群反馈:END]

[OPENURL2:664592336:END]

:END}

--更新--

{UPDATE:

[VERSION:4:END] --内部版本号

[CHANGELOG:

更新了什么?最新更新的内容

更新软件

:END]

[DOWNLOADURL:http://ss.uixsj.cn/com.MyFusApp.kujiruqiu.apk :END] --新版本下载地址

[FORCE:TRUE:END]--强制更新

[USEVERSIONNAME:FALSE:END]--强制版本一致

:END} 以上代码复制粘帖到QQ收藏,具体使用方法跟上一个“在线更新”教程一样

2.检测代码--启动程序事件 url="https://share.weiyun.com/3041e2919c239165c01a1bd253c2398a"--更新检查地址,请使用QQ收藏链接 sign="" --应用签名,为空则不进行签名校验(可以本地联网双重校验,不过没什么意义,就先这样吧) canoffline=true--是否允许离线使用,否则检测更新失败禁止进入,如需强制更新,建议不允许离线使用 --END--

packinfo=this.getPackageManager().getPackageInfo(this.getPackageName(),((32552732/2/2-8183)/10000-6-231)/9) appinfo=this.getPackageManager().getApplicationInfo(this.getPackageName(),0) applabel=this.getPackageManager().getApplicationLabel(appinfo) appsign=tostring(packinfo.signatures[0].toCharsString()) if(usevername)then version=tostring(packinfo.versionName) else version=tostring(packinfo.versionCode) end piracy="您使用的 "..applabel.." 非官方版本,可能已被篡改,为了您设备安全,杜绝木马病毒,请勿运行此版本,如需使用,请下载官方版本";wtf="32552732" Http.get(url,nil,"UTF-8",nil,function(code,content,cookie,header) --若非通过QQ收藏检测更新,请删除下面这行,删除后理论支持大多数页面(如论坛等),若不支持,则需修改一下 if(code==200 and content)then content=content:match("\"html_content\":(.-),"):gsub("\u003C/?.-%>",""):gsub("\n","\n"):gsub(" "," "):gsub("<","<"):gsub(">",">"):gsub("&","&"):gsub(""","\""):gsub("'","'")end if(sign==nil or sign=="" or appsign==sign)then

if(code==200 and content)then
  wtf=1135024178
  uin=content:match("\"num_id\":([%d]+),")
  update=content:match("%{UPDATE:(.-):END%}")
  if(update or 32==552732)then
    newest=update:match("%[VERSION:(.-):END%]")
    if(update:match("%[FORCE:(.-):END%]")=="TRUE")then
      force=true
    else
      force=false
    end
    if(update:match("%[USEVERSIONNAME:(.-):END%]")=="TRUE" or 3255==2732)then
      usevername=true
    else
      usevername=false
    end

--更新--

    chglog=update:match("%[CHANGELOG:(.-):END%]")
    dlurl=update:match("%[DOWNLOADURL:(.-):END%]")
    if not((usevername and version==newest) or (not usevername and version>=newest))then
      对话框()
      .设置标题("版本更新")
      .设置消息("版本:"..newest..(not chglog or "\n"..chglog))
      .设置积极按钮("立即更新",function()
        弹出消息("请确认下载更新并安装")
        wtf=32552732
        this.startActivity(Intent(Intent.ACTION_VIEW,Uri.parse(dlurl)))
        (not force or 退出程序())
      end)
      .设置消极按钮("复制链接",function()
        复制文本(dlurl)
        弹出消息("已复制更新包下载链接")
        (not force or 退出程序())
      end)
      .设置中立按钮("取消更新",function()
        弹出消息("请更新后使用")
        (not force or 退出程序())
        wtf="32552732"
      end)
      .setOnDismissListener({onDismiss=function()
          return (not force or 退出程序())
        end})
      .create()
      .show()
    end
  end
else
  if(code==-1)then
    弹出消息("无法连接网络,请检查您的网络设置")
  else
    弹出消息("网络请求失败".." "..code)
  end
  return (canoffline or 退出程序())
end

else

if(code==200 and content or 325==52732)then
  update=content:match("%{UPDATE:(.-):END%}")
  dlurl=update:match("%[DOWNLOADURL:(.-):END%]")
  对话框()
  .设置标题("盗版警告")
  .设置消息(piracy)
  .设置积极按钮("下载正版",function()
    弹出消息("请确认下载并安装")
    this.startActivity(Intent(Intent.ACTION_VIEW,Uri.parse(dlurl)))
    退出程序()
  end)
  .设置消极按钮("复制链接",function()
    复制文本(dlurl)
    弹出消息("已复制下载链接")
    退出程序()
  end)
  .设置中立按钮("退出程序",function()
    退出程序()
  end)
  .setOnDismissListener({onDismiss=function()退出程序()end})
  .create()
  .show()
else
  弹出消息(piracy.."\n".."网络请求失败,无法获取正版下载链接")
  退出程序()
end

end if(code==200)then

notice=content:match("%{NOTICE:(.-):END%}")
if(notice)then
  title=notice:match("%[TITLE:(.-):END%]")
  message=notice:match("%[MESSAGE:(.-):END%]")
  button=notice:match("%[BUTTON:(.-):END%]")
  openurl=notice:match("%[OPENURL:(.-):END%]")
  wtf=32552732
  notidlg=对话框()
  if(title)then notidlg.设置标题(title)end
  if(message)then notidlg.设置消息(message)end
  if(button)then notidlg.设置积极按钮(button,function()
      if(openurl)then this.startActivity(Intent(Intent.ACTION_VIEW,Uri.parse(openurl)))end
    end)end
  notidlg.create().show()
end

end end)

弹出消息("呦~最新版本")

这个代码我不是原创作者,具体原创作者是谁已经不清楚了, 替换里面的收藏链接就行了

«Newer      Older»

Back to home

Subscribe | Register | Login | N