PT作弊分析

标签: , , , ,

PT作弊与“反作弊”分析

反作弊分析

NexusPHP分析

NexusPHP是一款著名的开源PT服务器软件。目前国内许多PT站点都在使用这款软件作为PT站点的服务器端(例如CHD,HDStar,葡萄)。

不过NexusPHP的反作弊逻辑比较简单,只能通过上传速度、上传量和做种人数进行简单猜测。将可能作弊的人加入列表,根据上榜次数推测用户是否作弊。这种方法简单但是会很大概率造成误判,而且只要作弊者控制好了上传速度,便不会被发现。

这里谈及的是NexusPHP 1.5。与判断作弊行为相关的内容不多,下面简单的分析一下NexusPHP的“反作弊”功能。

下面节选了函数check_cheater(位于include/functions_announce.php)的几个条件语句:

  • if ($uploaded > 1073741824 && $upspeed > (104857600/$cheaterdet_security)) //Uploaded more than 1 GB with uploading rate higher than 100 MByte/S (For Consertive level). This is no doubt cheating.
  • if ($uploaded > 1073741824 && $upspeed > (10485760/$cheaterdet_security)) //Uploaded more than 1 GB with uploading rate higher than 10 MByte/S (For Consertive level). This is likely cheating.
  • if ($uploaded > 1073741824 && $upspeed > 1048576 && $leechers < (2 * $cheaterdet_security)) //Uploaded more than 1 GB with uploading rate higher than 1 MByte/S when there is less than 8 leechers (For Consertive level). This is likely cheating.
  • if ($uploaded > 10485760 && $upspeed > 102400 && $leechers == 0) //Uploaded more than 10 MB with uploading speed faster than 100 KByte/S when there is no leecher. This is likely cheating.

简单的说,意思就是(有注释),NexusPHP认为:

  • 上传量超过1GB,而且上传速度超过100 MB/s,无疑是作弊(会立刻禁用)
  • 上传量超过1GB,而且上传速度超过10 MB/s,可能是作弊(列入怀疑名单)
  • 上传量超过1GB,而且上传速度超过1 MB/s,而且此时下载人数小于2人,可能是作弊(列入怀疑名单)
  • 上传量超过10MB,而且上传速度超过100 KB/s,而且此时没有人在下载,可能是作弊(列入怀疑名单)

以上判断条件实为默认设置,其中一常量$cheaterdet_security(默认为1)可被人为改变。如果变得更苛刻,这些速度的阈值会更低一些,例如当该值为4时:

  • 上传量超过1GB,而且上传速度超过25 MB/s,无疑是作弊(会立刻禁用)
  • 上传量超过1GB,而且上传速度超过2.5 MB/s,可能是作弊(列入怀疑名单)
  • 上传量超过1GB,而且上传速度超过1 MB/s,而且此时下载人数小于8人,可能是作弊(列入怀疑名单)
  • 上传量超过10MB,而且上传速度超过100 KB/s,而且此时没有人在下载,可能是作弊(列入怀疑名单)

由此可以看出,NexusPHP的流量异常测试仅仅能够通过上传速度、下载人数来作出猜测,非常简陋。用户在NexusPHP站点上使用流量作弊软件时,需要注意上传速度不应太大,否则便会引起怀疑。

下面是几行显示在NexusPHP管理面板上的几句对不懂使用方法的管理员的警告:

  • Although the word cheat is used here, it should be kept in mind that this is statistical analysis – "There are lies, damm lies, and statistics!"

    The value for cheating can and will change quite drastically depending on what is happening, so you should always take into account other factors before issueing a warning.

    Somebody might get quite a high cheat value, but never cheat in their life – simply from bad luck in when the client updates the tracker – but that will drop again in the future. A true cheater will stay consistantly high…

这提示信息警告着管理员,被加入怀疑列表的用户,也不一定是作弊者,有可能只是由网络状况引起。不过反过来说,一直维持在怀疑列表中的用户,很可能就是作弊者。这几行话,反作弊逻辑的心虚及对状况的无把握,也就可见一斑了。

新版本的PTLiar根据这些条件,刻意设计仅在相对安全的情况下以合适的速度上传,使用户能尽可能不被列入怀疑列表之中。

总结:Nexus的反作弊措施较为简单,仅仅根据上传速度和下载人数猜测,作弊者控制好上传速度便不会受到怀疑。

原文链接:http://ptliar.com/analysis.php

赞赏

微信赞赏支付宝赞赏

随机文章:

  1. 火狐(FireFox)中的onkeydown事件
  2. VBS 获取外网 IP 并发送到指定邮箱
  3. VB6拾遗:LSet语句和RSet语句
  4. JavaScript 中小数和大整数的精度丢失
  5. ass2srt.vbs(ass/ssa批量转换srt)

留下回复