<kbd id="afajh"><form id="afajh"></form></kbd>
<strong id="afajh"><dl id="afajh"></dl></strong>
    <del id="afajh"><form id="afajh"></form></del>
        1. <th id="afajh"><progress id="afajh"></progress></th>
          <b id="afajh"><abbr id="afajh"></abbr></b>
          <th id="afajh"><progress id="afajh"></progress></th>

          自動(dòng)蓋樓刷淘寶喵幣!拿紅包都靠這厲害的腳本...

          共 2190字,需瀏覽 5分鐘

           ·

          2020-11-03 13:20

          點(diǎn)擊“開(kāi)發(fā)者技術(shù)前線”,選擇“星標(biāo)?”

          13:21 在看|星標(biāo)|留言, ?真愛(ài)

          開(kāi)源最前線(ID:OpenSourceTop)


          這幾天,雙十一的活動(dòng)有沒(méi)有把你折騰的不輕呢?如果沒(méi)有,只有兩種可能:一,你沒(méi)女朋友;二,你沒(méi)有女性朋友,不然你一定會(huì)收到如下消息



          要知道阿里每年都會(huì)發(fā)放大量紅包、各種優(yōu)惠券和各種互助游戲......而這兩天,馬爸爸的“ATM”們可都沉迷于這些個(gè)互助游戲里不可自拔,吾日三省吾身:簽到了?做任務(wù)了么?升級(jí)了么?



          一般我們程序員對(duì)這種游戲都是沒(méi)什么太大興趣,畢竟每天都有找不完的Bug,加不完的班,但是假如在這時(shí)候你的女神向你求幫助的時(shí)候,就你那個(gè)等級(jí)你拿的出手么?



          所以,程序員怎么能錯(cuò)過(guò)這么一個(gè)在女神面前展現(xiàn)專業(yè)能力的時(shí)候呢,這不,今天猿妹就在GitHub上發(fā)現(xiàn),有程序員寫了一個(gè)小腳本,可以每天自動(dòng)做任務(wù),領(lǐng)喵幣,這下幫女神蓋樓,再也不用擔(dān)心等級(jí)低了:



          可以看出來(lái)目前這個(gè)小腳本還沒(méi)有引起程序員的注意,一個(gè)星星都還沒(méi)獲得(GitHub地址:https://github.com/sleepybear1113/taobaoVisitingVenues



          其實(shí),這個(gè)腳本并不難,基于auto.js框架來(lái)實(shí)現(xiàn),auto.js是一個(gè)支持無(wú)障礙服務(wù)的Android平臺(tái)上的JavaScript IDE,以控件為基礎(chǔ),能自動(dòng)運(yùn)行一些操作,實(shí)現(xiàn)懸浮窗錄制和運(yùn)行。所以這個(gè)腳本只支持安卓系統(tǒng)。

          詳細(xì)的腳本代碼如下:


          let?deviceWidth?=?device.width;
          let?deviceHeight?=?device.height;

          function?openBeginningBtnItem(delay)?{
          ????let?items?=?textStartsWith("gif;base64").depth(19).find();
          ????console.log("尋找--領(lǐng)喵幣");
          ????if?(items.length?>?0)?{
          ????????let?item?=?items[items.length?-?1];
          ????????console.log("點(diǎn)擊--領(lǐng)喵幣");
          ????????clickItemInCenter(item);
          ????????sleep(delay);
          ????????return?1;
          ????}
          ????return?-1;
          }

          function?isOpenBeginning()?{
          ????let?signIn?=?textContains("簽到").findOnce();
          ????if?(signIn?!=?null)?{
          ????????console.log("成功--打開(kāi)領(lǐng)取中心");
          ????????return?1;
          ????}
          ????return?-1;
          }

          function?ensureOpenBeginning(waitDelay)?{
          ????if?(isOpenBeginning()?===?-1)?{
          ????????openBeginningBtnItem(waitDelay);
          ????}
          ????if?(isOpenBeginning()?===?1)?return?1;

          ????console.error("失敗--打開(kāi)領(lǐng)取中心");
          ????toast("失敗--打開(kāi)領(lǐng)取中心");
          ????return?-1;
          }

          function?clickItemInCenter(item,?time)?{
          ????if?(time?==?null)?time?=?50;
          ????if?(item?==?null)?return;
          ????let?x?=?item.bounds().centerX();
          ????let?y?=?item.bounds().centerY();
          ????press(x,?y,?time);
          }

          function?goShopping()?{
          ????let?shopping?=?text("去瀏覽").findOne(1000);
          ????if?(shopping?==?null)?{
          ????????toastLog("結(jié)束--未知問(wèn)題");
          ????????return?-1;

          ????}
          ????console.log("開(kāi)始瀏覽...");
          ????clickItemInCenter(shopping);
          ????return?1;
          }

          function?swipeUp()?{
          ????let?x?=?parseInt(deviceWidth?/?2);
          ????let?duration?=?500;
          ????let?y?=?[parseInt(deviceHeight?*?0.75),?parseInt(deviceHeight?*?0.25)];
          ????swipe(x,?y[0],?x,?y[1],?duration);
          ????swipe(x,?y[0],?x,?y[1],?duration);
          }

          function?isFull()?{
          ????for?(let?i?=?0;?i?10;?i++)?{
          ????????if?(descContains("已達(dá)上限").findOnce()?||?textContains("已達(dá)上限").findOnce())?{
          ????????????console.log("今日已達(dá)上限");
          ????????????return?1;
          ????????}
          ????????sleep(1000);
          ????}
          ????return?0
          }


          function?waitSwipe()?{
          ????let?swipeAppear;
          ????let?shoppingFull;
          ????for?(let?i?=?0;?i?3;?i++)?{
          ????????swipeAppear?=?desc("滑動(dòng)瀏覽得").findOne(1000);
          ????????if?(swipeAppear?!=?null)?break;
          ????????shoppingFull?=?descContains("已達(dá)上限").findOne(1000);
          ????????if?(shoppingFull?!=?null)?return?0;
          ????????console.log("i"?+?i);
          ????}

          ????sleep(1000);

          ????if?(swipeAppear?!=?null)?{
          ????????console.log("開(kāi)始滑動(dòng)");
          ????????swipeUp();
          ????????console.log("等待15s");
          ????????sleep(1000?*?16);
          ????}?else?{
          ????????console.log("slow");
          ????????console.log("等待20s");
          ????????sleep(1000?*?20);
          ????}

          ????let?shoppingFinish?=?desc("任務(wù)完成").findOne(2000);
          ????if?(shoppingFinish?!=?null)?{
          ????????console.log("逛完,準(zhǔn)備返回");
          ????}?else?{
          ????????toastLog("未知逛完,返回");
          ????}

          ????return?1;
          }

          function?browseFinish()?{
          ????for?(let?i?=?0;?i?10;?i++)?{
          ????????let?normalFinishDesc?=?descContains("已獲得").findOnce();
          ????????let?normalFinishText?=?textContains("已獲得").findOnce();
          ????????let?swipeFinish?=?desc("任務(wù)完成").findOnce();

          ????????if?(normalFinishDesc?!=?null?||?swipeFinish?!=?null?||?normalFinishText?!=?null)?{
          ????????????console.log("瀏覽結(jié)束");
          ????????????return?0;
          ????????}
          ????????sleep(250);
          ????}

          ????console.log("瀏覽未知");
          ????return?-1;
          }

          function?judgeWay()?{
          ????let?timeOut?=?1000?*?7;
          ????let?delay?=?250;
          ????let?loops?=?parseInt(timeOut?/?delay);
          ????for?(let?i?=?0;?i?????????let?swipeAppearDesc?=?descContains("滑動(dòng)瀏覽得").findOnce();
          ????????let?swipeAppearText?=?textContains("滑動(dòng)瀏覽得").findOnce();
          ????????if?(swipeAppearDesc?!=?null?||?swipeAppearText?!=?null)?{
          ????????????console.log("已獲取到滑動(dòng)瀏覽模式");
          ????????????return?0;
          ????????}

          ????????let?directBrowseDesc?=?desc("瀏覽").findOnce();
          ????????let?directBrowseText?=?text("瀏覽").findOnce();
          ????????if?(directBrowseDesc?!=?null?||?directBrowseText?!=?null)?{
          ????????????if?(descContains("00喵幣").findOnce()?!=?null?||?textContains("00喵幣").findOnce()?!=?null)?{
          ????????????????console.log("已獲取到正常瀏覽模式");
          ????????????????return?1;
          ????????????}
          ????????}

          ????????sleep(delay);
          ????}

          ????console.log("超時(shí)");
          ????return?-1;
          }

          function?reopenAgain()?{
          ????console.log("reopen");
          ????let?tbs?=?id("taskBottomSheet").findOnce();
          ????if?(tbs?==?null)?return?-1;
          ????let?close?=?tbs.child(1);
          ????if?(close?!=?null)?{
          ????????console.log("關(guān)閉");
          ????????clickItemInCenter(close);
          ????????sleep(1000);
          ????????return?ensureOpenBeginning(1000);
          ????}
          ????return?-1;
          }

          function?runGoShopping()?{
          ????let?isSuccess;

          ????for?(let?i?=?0;?i?20;?i++)?{
          ????????isSuccess?=?ensureOpenBeginning(1000);
          ????????if?(isSuccess?!==?1)?break;
          ????????isSuccess?=?goShopping();

          ????????let?count?=?0;
          ????????while?(isSuccess?!==?1)?{
          ????????????if?(reopenAgain()?===?1)?{
          ????????????????isSuccess?=?1;
          ????????????????break;
          ????????????}
          ????????????if?(count++?>=?2)?break;
          ????????}

          ????????if?(isSuccess?===?-1)?break;

          ????????let?st?=?waitSwipe();
          ????????if?(st?===?0)?{
          ????????????toastLog("已達(dá)上限,結(jié)束腳本");
          ????????????return?0;
          ????????}

          ????????back();
          ????????sleep(1000);
          ????}


          ????if?(isSuccess?===?0)?{
          ????????toastLog("正常結(jié)束");
          ????????return?0;
          ????}?else?if?(isSuccess?===?-1)?{
          ????????toastLog("異常結(jié)束");
          ????????return?1;
          ????}
          }


          function?clickGoBrowse()?{
          ????let?browse?=?text("去瀏覽").findOne(1000);
          ????if?(browse?!=?null)?{
          ????????let?guessYouLike?=?textContains("猜你喜歡").findOnce();
          ????????if?(guessYouLike?!=?null)?{
          ????????????console.log("出現(xiàn)猜你喜歡");
          ????????????let?pp?=?browse.parent.bounds().top;
          ????????????let?ppp?=?guessYouLike.parent.parent.bounds().top;
          ????????????if?(ppp?===?pp)?{
          ????????????????console.log("跳過(guò)--猜你喜歡");
          ????????????????let?allBrowse?=?text("去瀏覽").find();
          ????????????????for?(let?i?=?0;?i?????????????????????let?item?=?allBrowse[i];
          ????????????????????if?(item.bounds().top?!==?browse.bounds().top)?{
          ????????????????????????browse?=?item;
          ????????????????????}
          ????????????????}
          ????????????}
          ????????}

          ????????console.log("點(diǎn)擊--去瀏覽");
          ????????clickItemInCenter(browse);
          ????????return?1;
          ????}
          ????return?-1;
          }

          function?runGoBrowse()?{
          ????let?isSuccess?=?1;

          ????for?(let?i?=?0;?i?40;?i++)?{
          ????????isSuccess?=?ensureOpenBeginning(1000);
          ????????if?(isSuccess?!==?1)?break;

          ????????for?(let?j?=?0;?j?3;?j++)?{
          ????????????isSuccess?=?clickGoBrowse();
          ????????????if?(isSuccess?!==?1)?{
          ????????????????reopenAgain();
          ????????????}?else?break;
          ????????}

          ????????if?(isSuccess?===?-1)?break;

          ????????let?jw?=?judgeWay();

          ????????sleep(1000);
          ????????if?(jw?===?0)?swipeUp();
          ????????else?if?(jw?===?-1)?{
          ????????????if?(isFull()?===?1)?{
          ????????????????console.log("已達(dá)上限");
          ????????????????back();
          ????????????????sleep(2000);
          ????????????????reopenAgain();
          ????????????????continue;
          ????????????}
          ????????????console.log("4s");
          ????????????sleep(1000?*?4);
          ????????}
          ????????console.log("15s");
          ????????sleep(1000?*?15);


          ????????let?isF?=?browseFinish();
          ????????if?(isF?===?0)?{
          ????????????console.log("瀏覽結(jié)束,返回");
          ????????}?else?if?(isF?===?-1)?{
          ????????????console.log("瀏覽未正常結(jié)束,返回");
          ????????}

          ????????back();
          ????????sleep(2000);
          ????}
          }

          function?removeFile(fileName)?{
          ????if?(files.exists(fileName))?{
          ????????files.remove(fileName);
          ????}
          }

          function?clearNewScript()?{
          ????threads.start(function?()?{
          ????????removeFile("/sdcard/腳本/淘寶喵幣/script.js");
          ????????removeFile("/sdcard/腳本/淘寶喵幣/version.txt");
          ????????toastLog("清除完成");
          ????});
          }


          function?warning(n)?{
          ????let?items?=?["不更新,但還是試試新腳本(不保證能用)",?"清除本地下載的新腳本,使用默認(rèn)腳本",?"點(diǎn)擊這里下載新APP"];

          ????let?ch?=?dialogs.select("當(dāng)前新版本不適用于此舊APP,請(qǐng)更新到新APP。",?items,?function?(index)?{

          ????????if?(index?>=?0)?{

          ????????????if?(index?===?0)?{

          ????????????????threads.start(function?()?{
          ????????????????????sleep(1000);
          ????????????????????runRun(n);
          ????????????????});

          ????????????}?else?if?(index?===?1)?{
          ????????????????clearNewScript();
          ????????????}?else?if?(index?===?2)?{
          ????????????????alert("哪里下載的舊APP就去哪里下載新APP,我可沒(méi)心思發(fā)布");
          ????????????}
          ????????}
          ????});
          }

          function?runRun(n)?{
          ????sleep(500);

          ????let?statue?=?runGoBrowse();
          ????toastLog("去瀏覽--瀏覽結(jié)束");
          ????alert("結(jié)束");
          }

          function?moveFloating(n)?{
          ????let?i?=?-1;
          ????dialogs.confirm("由于需要,請(qǐng)將懸浮窗移動(dòng)至靠左。",?"點(diǎn)擊確認(rèn)表示已完成,直接運(yùn)行腳本。\n點(diǎn)擊取消則手動(dòng)前去調(diào)整。\n"?+
          ????????"(中間瀏覽過(guò)程中可能會(huì)跳轉(zhuǎn)到淘寶首頁(yè)進(jìn)行瀏覽,此時(shí)需要手動(dòng)再次切回貓鋪。)",?function?(clear)?{
          ????????if?(clear)?{
          ????????????console.log("直接運(yùn)行");
          ????????????i?=?1;
          ????????}?else?{
          ????????????toastLog("請(qǐng)將懸浮窗移動(dòng)至靠左");
          ????????????i?=?0;
          ????????}
          ????});


          ????while?(i?===?-1)?{
          ????????slepp(100);
          ????}
          ????if?(i?===?1)?{
          ????????runRun(n);
          ????}
          }

          function?runChoose(n)?{
          ????let?currentVersion?=?app.versionCode;
          ????if?(currentVersion?===?1)?{
          ????????warning(n);
          ????}?else?{
          ????????moveFloating(n);
          ????}
          }

          module.exports?=?runChoose;


          如果你不懂的話,就直接下載使用,記得開(kāi)啟懸浮窗,然后再切換到淘寶:



          就可以實(shí)現(xiàn)以下效果啦:

          附APK下載:

          1、掃碼關(guān)注「gitcub」訂閱號(hào)

          2、回復(fù)「喵幣apk」即可獲取


          長(zhǎng)按 2 秒,回復(fù)「喵幣apk」即可下載




          END



          開(kāi)發(fā)者技術(shù)前線?,匯集技術(shù)前線快訊和關(guān)注行業(yè)趨勢(shì),大廠干貨,是開(kāi)發(fā)者經(jīng)歷和成長(zhǎng)的優(yōu)秀指南。
          「在看」大家一起看
          瀏覽 54
          點(diǎn)贊
          評(píng)論
          收藏
          分享

          手機(jī)掃一掃分享

          分享
          舉報(bào)
          評(píng)論
          圖片
          表情
          推薦
          點(diǎn)贊
          評(píng)論
          收藏
          分享

          手機(jī)掃一掃分享

          分享
          舉報(bào)
          <kbd id="afajh"><form id="afajh"></form></kbd>
          <strong id="afajh"><dl id="afajh"></dl></strong>
            <del id="afajh"><form id="afajh"></form></del>
                1. <th id="afajh"><progress id="afajh"></progress></th>
                  <b id="afajh"><abbr id="afajh"></abbr></b>
                  <th id="afajh"><progress id="afajh"></progress></th>
                  女人高嘲90分钟视频 | 日韩级视频 | 大香蕉伊人电影网 | 做爱免费网址 | 久草手机在线 |