Skip to content

Instantly share code, notes, and snippets.

@Garwih
Last active June 13, 2019 01:28
Show Gist options
  • Save Garwih/352113d8e0f80214292e28496a51d4ab to your computer and use it in GitHub Desktop.
Save Garwih/352113d8e0f80214292e28496a51d4ab to your computer and use it in GitHub Desktop.

改良版本的自动刷喵币脚本

原脚本地址:https://saodaye.com/sharel/2138.html

Update

19.06.13 更新点击获取喵币的 className,修改提醒文案;

开始

  1. PC端使用Chrome内核的浏览器,例如 Chrome浏览器、360极速浏览器、极速模式等等;

  2. 在浏览器中打开:https://login.m.taobao.com/login.htm 进行登录操作,已登录的朋友可以直接忽略;

  3. 在浏览器中按下F12键,随即会调出浏览器控制台,步骤依次操作:调出手机模式、随便选择一个型号、点击console

  4. 在浏览器地址栏粘贴此链接:https://pages.tmall.com/wow/a/act/tmall/tmc/22351/wupr?wh_pid=industry-161308&sellerId=3079263591

  5. 在console里输入以下代码并回车,程序将自动运行:

function getRandomInt(e){return Math.floor(Math.random()*Math.floor(e))}function repeat(){setTimeout(function(){var e=frames[0].document.getElementsByClassName("svelte-qr71gg")[1];void 0!==e?(e.click(),setTimeout(function(){var e=getRandomInt(len),t=location.href.replace(/sellerId=\d+/,"sellerId="+storeId[e]);frames[0].location.href=t},1e3)):(tips.innerHTML="已刷完,总次数:"+i+"次",clearInterval(timer))},12e3),i++}document.write("<iframe width=100% height=100% frameborder=0 scrolling=yes>"),frames[0].location.href=location.href;var storeId=[1968965736,1771485843,3020935960,706084574,2200726153564,1639932528,723989220,2200807254153,676650011,877564609,1761495540,676606897,1136546408,1602475441,2994100240,898199020,2526051849,737934527,486093582,2590392037,94504595,2091178755,2932255676,3083173120,3869957720,2697170250,2791629312,684553196,705235443,667336302,486093582,2200595414099,685563493,556600480,202224264,1752533979,1749660702,2567440597,2012793042,385132127,349740505,2456386471,2200710143885,3170524639,1023696028,2745562235,877564609,2200957673341,3406892187,4206132035,363607599,1650269249,779984393,379250310,2200828663352,3920133926,748681129,1911901150,2944773941,2587463881,2867731987,1983897015,4178951120,1703307078,1974919058,3838275047,391855827,2129855716,880734502,425442519,2989453928,845001562,3955884940,1754310760,1813097055,3369266294,749391658,3293536442,3857138549,2027551265,373079721,821010096,721002017,829273025,89719870,515369883,299244686,2375538726,387542955,3925243888,1790973264,353042333,358164451,263680407,263669477],len=storeId.length,tips=document.createElement("div"),i=1;tips.innerHTML="第1次",tips.style="text-align: center; font-size: 14px; background: #000; color: #fff; padding: 10px 0;",document.body.insertBefore(tips,document.body.childNodes[0]);var timer=setInterval(function(){i>60?(clearInterval(timer),tips.innerHTML="已刷 60 次,结束"):(tips.innerHTML="第"+i+"次",repeat())},14e3);repeat();

源代码:

document.write('<iframe width=100% height=100% frameborder=0 scrolling=yes>');
frames[0].location.href = location.href;

const storeId = [
  1968965736,
  1771485843,
  3020935960,
  706084574,
  2200726153564,
  1639932528,
  723989220,
  2200807254153,
  676650011,
  877564609,
  1761495540,
  676606897,
  1136546408,
  1602475441,
  2994100240,
  898199020,
  2526051849,
  737934527,
  486093582,
  2590392037,
  94504595,
  2091178755,
  2932255676,
  3083173120,
  3869957720,
  2697170250,
  2791629312,
  684553196,
  705235443,
  667336302,
  486093582,
  2200595414099,
  685563493,
  556600480,
  202224264,
  1752533979,
  1749660702,
  2567440597,
  2012793042,
  385132127,
  349740505,
  2456386471,
  2200710143885,
  3170524639,
  1023696028,
  2745562235,
  877564609,
  2200957673341,
  3406892187,
  4206132035,
  363607599,
  1650269249,
  779984393,
  379250310,
  2200828663352,
  3920133926,
  748681129,
  1911901150,
  2944773941,
  2587463881,
  2867731987,
  1983897015,
  4178951120,
  1703307078,
  1974919058,
  3838275047,
  391855827,
  2129855716,
  880734502,
  425442519,
  2989453928,
  845001562,
  3955884940,
  1754310760,
  1813097055,
  3369266294,
  749391658,
  3293536442,
  3857138549,
  2027551265,
  373079721,
  821010096,
  721002017,
  829273025,
  89719870,
  515369883,
  299244686,
  2375538726,
  387542955,
  3925243888,
  1790973264,
  353042333,
  358164451,
  263680407,
  263669477
];
const len = storeId.length;
const tips = document.createElement('div');
let i = 1;

tips.innerHTML = '第1次';
tips.style = 'text-align: center; font-size: 14px; background: #000; color: #fff; padding: 10px 0;';
document.body.insertBefore(tips, document.body.childNodes[0]);

const timer = setInterval(function () {
  if (i > 60) {
    clearInterval(timer);
    tips.innerHTML = '已刷 60 次,结束'
  } else {
    tips.innerHTML = '第' + i + '次';
    repeat()
  }
}, 14000);

function getRandomInt(max) {
  return Math.floor(Math.random() * Math.floor(max));
}

function repeat() {
  setTimeout(function () {
    const mm = frames[0].document.getElementsByClassName('svelte-qr71gg')[1];
    if (typeof mm !== 'undefined') {
      mm.click();
      setTimeout(function () {
        let random = getRandomInt(len);
        const newHref = location.href.replace(/sellerId=\d+/, 'sellerId=' + storeId[random]);
        frames[0].location.href = newHref;
      }, 1000);
    } else {
      tips.innerHTML = '已刷完,总次数:' + i + '次';
      clearInterval(timer);
    }
  }, 12000);
  i++;
}
repeat();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment