海运的博客

QQ注册申请鼠标事件分析

发布时间:March 19, 2015 // 分类:JS // 1 Comment

初始化注册鼠标事件和注册提交id submit点击事件,鼠标事件记录的数据于注册提交时通过j.reportAq函数提交,和注册提交的数据相差时间很小,估计用于事后是否非法注册判断。

init: function() {
  //绑定鼠标事件
  j.bindMouseClickEvent();
  //绑定点击事件,当注册提交时触发
  $.e.add($('submit'), 'click', function() {
    if (p) {
      p = false;
      var a = dataArr0.length,
        b = parseInt(a / 50),
        c = a % 50;
      if (b > 0)
        for (var d = 0; d < b; d++) j.reportAq(j.dataToStrity(dataArr0.slice(50 * d, 50 * d + 50), 0));
      c > 0 && j.reportAq(j.dataToStrity(dataArr0.slice(50 * b, a - 1), 0));
      dataArr1.length && j.reportAq(j.dataToStrity(dataArr1, 1));
      dataArr2.length && j.reportAq(j.dataToStrity(dataArr2, 2));
      dataArr3.length && j.reportAq(j.dataToStrity(dataArr3, 3));
      e = (new Date).getTime();
      l.length = 0;
      n = new Date;
      for (a = 0; a < dataSet.length; a++) j.initData(dataSet[a]);
      for (a = 0; a < dataArrSet.length; a++) dataArrSet[a].length = 0
    }
  })
}
};

注册的鼠标事件,一般只会触发移动和单击事件:

bindMouseClickEvent: function() {
  //当鼠标移动时触发的事件
  document.onmousemove = function(a) {
    a = a || window.event;
    new Date - n > 200 && (n = new Date, j.addTargetData(a, 0, new d(0), 0, 0))
  };
  document.onmouseout = function(a) {
    a = a || window.event;
    new Date - n > 200 && (n = new Date, j.addTargetData(a, 0, new d(0), 0, 0))
  };
  document.onmouseover = function(a) {
    a = a || window.event;
    new Date - n > 200 && (n = new Date, j.addTargetData(a, 0, new d(0), 0, 0))
  };
  document.onclick = function(c) {
    c = c || window.event;
    c.target = c.srcElement ? c.srcElement : c.target;
    if (l.length > 0) var e = new Date - l[l.length - 1];
    c.target && a[c.target.id] ? j.addTargetData(c, 1, new d(1), b[c.target.id], e) : j.addTargetData(c, 1, new d(1), b.none, e)
  };
  document.ondblclick =
    function(c) {
      c = c || window.event;
      c.target = c.srcElement ? c.srcElement : c.target;
      var e;
      j.isIE() ? (e = new Date - l[l.length - 1], l.pop()) : (e = new Date - l[l.length - 2], l.pop(), l.pop(), dataArr1.pop());
      dataArr1.pop();
      c.target && typeof a[c.target.id] != 'undefined' ? j.addTargetData(c, 2, new d(2), b[c.target.id], e) : j.addTargetData(c, 2, new d(2), b.none, e)
    };
  document.oncontextmenu = function(c) {
    c = c || window.event;
    c.target = c.srcElement ? c.srcElement : c.target;
    var e = new Date - l[l.length - 1];
    l.pop();
    dataArr1.pop();
    c.target && typeof a[c.target.id] !=
      'undefined' ? j.addTargetData(c, 3, new d(3), b[c.target.id], e) : j.addTargetData(c, 3, new d(3), b.none, e)
  };
  document.onmousedown = function() {
    l.push(new Date)
  };
  document.onmouseup = function() {}
},

记录的数据通过addTargetData保存至dataArr数组,移动事件为dataArr0,点击事件为dataArr1,等。

addTargetData: function(a, b, c, d, f) {
    a = a || window.event;
    point = j.getMousePoint(a);
    c.recordCnt += 1;
    c.xSeries = point.x;
    c.ySeries = point.y;
    c.elementIDSeries = d;
    c.clickGapSeries = f;
    c.browserHeightSeries = j.getBrowser().winHeight;
    c.browserWidthSeries = j.getBrowser().winWidth;
    c.gapLog = (new Date).getTime() - e;
    j.addTargetArrData(b, c)
  },

  addTargetArrData: function(a, b) {
    switch (a) {
      case 0:
        dataArr0.push(b);
        break;
      case 1:
        dataArr1.push(b);
        break;
      case 2:
        dataArr2.push(b);
        break;
      case 3:
        dataArr3.push(b)
    }
  },

标签:none

有一条 关于" QQ注册申请鼠标事件分析 "的评论

  1. 羽凡 羽凡

    你好,对你的QQjs比较感兴趣,能否交流下? 谢谢!

发表评论

分类
最新文章
最近回复
  • zzg: http://downloads.openwrt.org.cn/PandoraBox/rali...
  • xiongrui: 看图
  • 傻狍子: filebrowser好像和这功能一样? https://github.com/filebro...
  • 陶国文: 想看看能不能安装
  • 傻狍子: 服务端设置了用户名密码认证的话,在openwrt的openvpn客户端的配置文件当中该如何更改...
  • 王阴阳师: 感谢,一点不啰嗦,还很管用!
  • simon: 刚刚看了我的vps,玛德,居然也有人在一直尝试登录,幸好我的密码是强密码
  • thornbird: 又学会一招,不错
  • 头很黑: 除了发送eth转账 ,还能转账其他的代币吗 比如eos
  • 米扑博客: 总结的很棒