最近斯巴达vps比较火,一机难求,写了个js脚本用于抢购,效果还不错,推荐使用chrome浏览器,安装Tampermonkey扩展使用。
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 | // ==UserScript== // @name 自动抢购买vps // @namespace https://www.haiyun.me // @version 0.1 // @description buy spartanhost vps // @author www.haiyun.me // @match https://billing.spartanhost.net/cart.php?a=* // @grant none // ==/UserScript== ( function () { var forcedReload = false ; var time = 500; var url = document.URL; var hostname = "www.haiyun.me" ; var customfield = "website" ; if (document.title == '502 Bad Gateway' ) { setTimeout( function () { window.location.reload(forcedReload); }, time); } else if (document.title == '504 Gateway Time-out' ) { setTimeout( function () { window.location.reload(forcedReload); }, time); } else if (document.title == '503 Service Temporarily Unavailable' ) { setTimeout( function () { window.location.reload(forcedReload); }, time); } else if (document.title == '500 Internal Server Error' ) { setTimeout( function () { window.location.reload(forcedReload); }, time); } else if (document.getElementsByTagName( 'h1' )[0].innerHTML == '无法访问此网站' ) { setTimeout( function () { window.location.reload(forcedReload); }, time); } var str = document.getElementById( "order-boxes" ).innerHTML; if (str.indexOf( "Out of Stock" ) != -1) { setTimeout( function () { window.location.reload(forcedReload); }, time); } document.getElementById( "inputHostname" ).value = hostname; var element = document.querySelector( 'input[name^="customfield"]' ); element.value = customfield; document.getElementById( "btnCompleteProductConfig" ).click(); document.getElementById( "checkout" ).click(); document.getElementById( "iCheck-accepttos" ).click(); document.getElementById( "btnCompleteOrder" ).click(); } })(); |
标签:vps, tampermonkey
大佬斯巴达开启了CF的机器识别验证,请问插件能自动跳过吗?
另外这个脚本有没有简单使用说明,新手请见谅,不懂就问了
应该能,在购买页面先手工跳过cf机器验证,后续一定时间内不更换ip应该不会再次验证。
https://dashboard.hcaptcha.com/welcome_accessibility
这个可以12小时内跳过验证
建议博主写个自动设置cookie的