加入收藏 | 设为首页 | 会员中心 | 我要投稿 湖南网 (https://www.hunanwang.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 业界 > 正文

说明黑客 | 适用能力之“抢火车票、红包技能”,防惫亓?受骗

发布时间:2019-01-17 21:57:50 所属栏目:业界 来源:Jayson
导读:一、抢火车票 1、抢火车票软件的技能道理 今朝主流的抢票软件是安装在赏识器上的插件,像猎豹、360赏识器等,用于在12306网站上抢票。 通例环境下,行使12306网站订票时,假如革新页面就必要再次填写小我私人书息,这就延伸了不少时刻。这一延伸,也许必要秒杀

检测监听变乱的节点信息

  1. private void checkNodeInfo() { 
  2.  L.d("checkNodeInfo!"); 
  3.  if (this.rootNodeInfo == null) return; 
  4.  /* 谈天会话窗口,遍历节点匹配“领取红包”和"查察红包" */ 
  5.  List<AccessibilityNodeInfo> nodes1 = this.findAccessibilityNodeInfosByTexts(this.rootNodeInfo, new String[]{ 
  6.  GET_RED_PACKET, CHECK_RED_PACKET}); 
  7.  if (!nodes1.isEmpty()) { 
  8.  L.d("!nodes1.isEmpty()"); 
  9.  AccessibilityNodeInfo targetNode = nodes1.get(nodes1.size() - 1); 
  10.  if ("android.widget.LinearLayout".equals(targetNode.getParent().getClassName()))//停止被笔墨滋扰导致外挂失效 
  11.  { 
  12.  if (this.signature.generateSignature(targetNode)) { 
  13.  mLuckyMoneyReceived = true; 
  14.  mReceiveNode = targetNode; 
  15.  L.d("signature:" + this.signature.toString()); 
  16.  } 
  17.  } else { 
  18.  L.d("this is text"); 
  19.  } 
  20.  return; 
  21.  } 
  22.   
  23.  List<AccessibilityNodeInfo> nodes2 = this.findAccessibilityNodeInfosByTexts(this.rootNodeInfo, new String[]{ 
  24.  "拆红包"}); 
  25.  if (!nodes2.isEmpty()) { 
  26.  L.d("node2 != null"); 
  27.  for (AccessibilityNodeInfo nodeInfo : nodes2) { 
  28.  if (nodeInfo.getClassName().equals("android.widget.Button")) 
  29.  nodeInfo.performAction(AccessibilityNodeInfo.ACTION_CLICK); 
  30.  } 
  31.  } else { 
  32.  /* 戳开红包,红包还没抢完,遍历节点匹配“拆红包” */ 
  33.  AccessibilityNodeInfo node2 = (this.rootNodeInfo.getChildCount() > 3) ? this.rootNodeInfo.getChild(3) : null; 
  34.  if (node2 != null && node2.getClassName().equals("android.widget.Button")) { 
  35.  mUnpackNode = node2; 
  36.  mNeedUnpack = true; 
  37.  isToGetMoney = true; 
  38.  L.d("find red packet!"); 
  39.  return; 
  40.  } 
  41.  } 
  42.  /* 戳开红包,红包已被抢完,遍历节点匹配“已存入零钱”和“手慢了” */ 
  43.  if (mLuckyMoneyPicked) { 
  44.  List<AccessibilityNodeInfo> nodes3 = this.findAccessibilityNodeInfosByTexts(this.rootNodeInfo, new String[]{ 
  45.  RED_PACKET_PICKED, RED_PACKET_SAVE, RED_PACKET_PICKED2, RED_PACKET_PICKED_DETAIL}); 
  46.  if (!nodes3.isEmpty()) { 
  47.  L.d("!nodes3.isEmpty()");  
  48.  if (rootNodeInfo.getChildCount() > 1) { 
  49.  L.d("RED_PACKET_PICKED!"); 
  50.  } else { 
  51.  L.d("nodes3.get(0).toString(): " + nodes3.get(0).getText().toString()); 
  52.  if (!nodes3.get(0).getText().toString().equals(RED_PACKET_PICKED_DETAIL)) { 
  53.  AccessibilityNodeInfo targetNode = nodes3.get(nodes3.size() - 1); 
  54.  hongbaoInfo.getInfo(targetNode); 
  55.  if (isToGetMoney) { 
  56.  isGetMoney = true; 
  57.  isToGetMoney = false; 
  58.  gotMoney = hongbaoInfo.getMoney(); 
  59.  L.d("gotMoney: " + gotMoney); 
  60.  } 
  61.  L.d("RED_PACKET_SAVE!"); 
  62.  L.d("hongbaoInfo: " + hongbaoInfo.toString()); 
  63.  } else { 
  64.  L.d("this packet is myself!"); 
  65.  } 
  66.   
  67.  } 
  68.  mNeedBack = true; 
  69.  mLuckyMoneyPicked = false; 
  70.  } 
  71.  } 
  72.  } 

首要通过检测“领取红包”等要害笔墨信息来判定是否有新红包

检测收到红包时判定是否"android.widget.LinearLayout",屏障谈天信息中的笔墨滋扰

拆红包时,因为微信版本也许差异,同时举办两种判定,以兼容部门版本

拆完红包需自动返回,有以下几种环境:抢到了,手慢了,以及该红包是本身发出的红包

(编辑:湖南网)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

热点阅读