Membean Cheat (patched)

This is the only undetectable membean userscript that I have seen. How the other "cheats" work is they click a hidden button that the membean devs purposefully put there to catch cheaters! This script is undetectable because it works by clearing the cookie that remembers when a question is answered incorrectly. What this script essentially does is deletes a cookie, which is something that any user can do manually, so it would not be possible for membean to detect this in it's current state.

安装此脚本
作者推荐脚本

您可能也喜欢noredink cheat

安装此脚本
  1. // ==UserScript==
  2. // @name Membean Cheat (patched)
  3. // @version 1.0
  4. // @description This is the only undetectable membean userscript that I have seen. How the other "cheats" work is they click a hidden button that the membean devs purposefully put there to catch cheaters! This script is undetectable because it works by clearing the cookie that remembers when a question is answered incorrectly. What this script essentially does is deletes a cookie, which is something that any user can do manually, so it would not be possible for membean to detect this in it's current state.
  5. // @author https://github.com/dayoshiguy
  6. // @match *://*.membean.com/dashboard/training-sessions/*
  7. // @match *://*.membean.com/dashboard/training-history*
  8. // @match *://*.membean.com/training_sessions/*
  9. // @match *://*.membean.com/dashboard
  10. // @match *://*.membean.com/dashboard?*
  11. // @grant GM_setValue
  12. // @grant GM_getValue
  13. // @grant window.close
  14. // @require https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js
  15. // @require https://unpkg.com/draggabilly@2/dist/draggabilly.pkgd.min.js
  16. // @namespace https://greasyfork.org/users/706584
  17. // ==/UserScript==
  18.  
  19. (function() {
  20. 'use strict';
  21. var $ = window.jQuery;
  22. var url=window.location.href;
  23. var jqNewButton="html>body>div:eq(0)>div>div>div>div>div:eq(1)>main>div>div>div>ul>li:eq(4)>span";
  24. var jqNewWords="html>body>div:eq(0)>div>div>div>div>div:eq(1)>main>div>div>div>div:eq(4)>div>div>div:eq(0)>div>span>strong>span";
  25. $( document ).ready(()=>{
  26. // Your code here...
  27. if(url.indexOf("dashboard")>-1&&url.indexOf("training-sessions")<=-1&&url.indexOf("training-history")<=-1){
  28. let i=0;
  29. let I=setInterval(()=>{
  30. if($("html>body>div:eq(0)>div>div>main>div:eq(1)>div:eq(0)>section>div:eq(1)>ul>li:eq(0)>div:eq(1)>p>span:eq(0)").width()!=null){
  31. if($("html>body>div:eq(0)>div>div>main>div:eq(1)>div:eq(0)>section>div:eq(1)>ul>li:eq("+i+")>div:eq(1)>p>span:eq(0)").width()!=null){
  32. i++;
  33. }
  34. else{
  35. clearInterval(I);
  36. callBack(i);
  37. }
  38. }
  39. function callBack(param){
  40. for(let i=0;i<=param;i++){
  41. $("html>body>div:eq(0)>div>div>main>div:eq(1)>div:eq(0)>section>div:eq(1)>ul>li:eq("+i+")>div:eq(1)>p>span:eq(0)").css("color","#6d6e71");
  42. $("html>body>div:eq(0)>div>div>main>div:eq(1)>div:eq(0)>section>div:eq(1)>ul>li:eq("+i+")>div:eq(1)>p>span:eq(0)").text(randInt(79,95)+"% accuracy");
  43. $("html>body>div:eq(0)>div>div>main>div:eq(1)>div:eq(0)>section>div:eq(1)>ul>li:eq("+i+")>p>button").html("");
  44. }
  45. }
  46. },10);
  47. }
  48. if(url.indexOf("user_state")>-1){//if in a membean training session
  49. /*var a="html>body>div:eq(0)>div:eq(1)>div>div:eq(1)>div:eq(3)>div>div:eq(1)>div:eq(0)>ul>li:eq(0)";//jq paths of choices
  50. var a2="html>body>div:eq(0)>div:eq(1)>div:eq(1)>div>div:eq(3)>div>div:eq(1)>div>ul>li:eq(0)"
  51. var b="html>body>div:eq(0)>div:eq(1)>div>div:eq(1)>div:eq(3)>div>div:eq(1)>div:eq(0)>ul>li:eq(1)";
  52. var b2="html>body>div:eq(0)>div:eq(1)>div:eq(1)>div>div:eq(3)>div>div:eq(1)>div>ul>li:eq(1)"
  53. var c="html>body>div:eq(0)>div:eq(1)>div>div:eq(1)>div:eq(3)>div>div:eq(1)>div:eq(0)>ul>li:eq(2)";
  54. var c2="html>body>div:eq(0)>div:eq(1)>div:eq(1)>div>div:eq(3)>div>div:eq(1)>div>ul>li:eq(2)"
  55. var d="html>body>div:eq(0)>div:eq(1)>div>div:eq(1)>div:eq(3)>div>div:eq(1)>div:eq(0)>ul>li:eq(3)";
  56. var d2="html>body>div:eq(0)>div:eq(1)>div:eq(1)>div>div:eq(3)>div>div:eq(1)>div>ul>li:eq(3)"*/
  57. //<li class="choice wrong"
  58. makeButton();
  59. let i=setInterval(()=>{
  60. var timeElapsed=$("html>body>div:eq(0)>div:eq(1)>div>div:eq(1)>div:eq(3)>div>div:eq(3)>div>div>div:eq(0)>div").width();
  61. var altTimeElapsed=$("html>body>div:eq(0)>div:eq(1)>div:eq(1)>div>div:eq(3)>div>div:eq(3)>div>div>div:eq(0)>div").width();
  62. /*these are both innefficient and suck but ill keep this here bc i might want it later idk
  63. if($(a).attr("class").indexOf("wrong")>-1 || $(a2).attr("class").indexOf("wrong")>-1
  64. || $(b).attr("class").indexOf("wrong")>-1 || $(b2).attr("class").indexOf("wrong")>-1
  65. || $(c).attr("class").indexOf("wrong")>-1 || $(c2).attr("class").indexOf("wrong")>-1
  66. || $(d).attr("class").indexOf("wrong")>-1 || $(d2).attr("class").indexOf("wrong")>-1){//if they got it wrong
  67. location.reload();
  68. clearInterval(i);
  69. }*/
  70. /*if(timeElapsed==0||altTimeElapsed==0){//checks if the timer is at zero for long enough to indicate that the answer is wrong
  71. let a=setTimeout(()=>{
  72. let b=setInterval(()=>{
  73. timeElapsed=$("html>body>div:eq(0)>div:eq(1)>div>div:eq(1)>div:eq(3)>div>div:eq(3)>div>div>div:eq(0)>div").width();
  74. altTimeElapsed=$("html>body>div:eq(0)>div:eq(1)>div:eq(1)>div>div:eq(3)>div>div:eq(3)>div>div>div:eq(0)>div").width();
  75. if(timeElapsed==0||altTimeElapsed==0){
  76. location.reload();
  77. clearInterval(b);
  78. clearInterval(i);
  79. }
  80. },100);
  81. },750);
  82. }*/
  83. if(getCookie("answered-incorrectly")!="" && document.getElementById("toggleGodMode").innerHTML=="disable no wrong words"){
  84. setCookie("answered-incorrectly","",365);
  85. location.reload();
  86. clearInterval(i);
  87. }
  88. if(timeElapsed!=null){
  89. //alert("");
  90. $("html>body>div:eq(0)>div:eq(1)>div>div:eq(1)>div:eq(3)>div>div:eq(3)>div>div>div:eq(1)>div").text(timeElapsed+"/257");
  91. if(timeElapsed>200){
  92. location.reload();
  93. clearInterval(i);
  94. }
  95. }else if(altTimeElapsed!=null){
  96. //alert("");
  97. $("html>body>div:eq(0)>div:eq(1)>div:eq(1)>div>div:eq(3)>div>div:eq(3)>div>div>div:eq(1)>div").text(altTimeElapsed+"/257");//for some reason it can be either one of these two
  98. $("html>body>div:eq(0)>div:eq(1)>div:eq(1)>div>div:eq(3)>div>div:eq(4)>div>div>div:eq(1)>div").text(altTimeElapsed+"/257");//for the first question after reload
  99. if(altTimeElapsed>200){
  100. location.reload();
  101. clearInterval(i);
  102. }
  103. //alert("");
  104. }
  105. //else{alert("aa");}
  106. },50);
  107. }
  108. if(url.indexOf("training-sessions")>-1){
  109. var interval=setInterval(()=>{
  110. if($(jqNewButton).length){//if exists
  111. $(jqNewButton).click();
  112. var newWords;
  113. if($(jqNewWords).text().indexOf("new words")>-1){
  114. newWords=parseInt($(jqNewWords).text().split(" new words")[0],10);//i.e. get "10" in "10 new words were introduced in this session." as int
  115. }else{
  116. newWords=0;
  117. }
  118. if(GM_getValue("subtract",false)!=true){
  119. GM_setValue("total",parseInt(GM_getValue("total",0),10)+newWords);
  120. }else{
  121. GM_setValue("total",parseInt(GM_getValue("total",0),10)-newWords);
  122. }
  123. GM_setValue("newWordsThisSession",newWords);
  124. GM_setValue("closed",true);
  125. window.close();
  126.  
  127. clearInterval(interval);
  128. }
  129. },50);
  130. }
  131.  
  132. function twoDigits(n){return n<10? '0'+n:''+n;}
  133. if(url.indexOf("training-history")>-1){
  134. //GM_setValue("checkedSessions","{}");
  135. //GM_setValue("total",0);
  136. var twbt = new Date();//(two weeks before today)
  137. var cd=new Date();//(current date)
  138. var urlParam="";//?startAt=2020-11-03T00:00:00-05:00&endAt=2020-11-17T11:05:22-05:00 encoded: ?startAt=2020-11-03T00%3A00%3A00-05%3A00&endAt=2020-11-17T11%3A05%3A22-05%3A00
  139. //twbt.setDate(twbt.getDate() - (2)); //single day only for testing purposes
  140. twbt.setDate(twbt.getDate() - (7*2));//two weeks before today
  141. urlParam="?startAt="+twbt.getFullYear()+"-"+twoDigits(twbt.getMonth()+1)+"-"+twoDigits(twbt.getDate())+"T00:00:00-05:00&endAt="+cd.getFullYear()+"-"+twoDigits(cd.getMonth()+1)+"-"+twoDigits(cd.getDate())+"T11:05:22-05:00";
  142. if(!(url.indexOf(urlParam)>-1)){
  143. window.location.href="https://membean.com/dashboard/training-history"+urlParam;
  144. }
  145. var intrval = setInterval(()=>{
  146. var currentHrefs={};//will store the ids on the current page
  147. if($("html>body>div:eq(0)>div>div>div>div>div:eq(1)>main>div>div>div:eq(1)>ul>li:eq(0)>a").length){
  148. var i=0;
  149. var intervaal=setInterval(()=>{
  150. if($("html>body>div:eq(0)>div>div>div>div>div:eq(1)>main>div>div>div:eq(1)>ul>li:eq("+i+")>a").length){
  151. if(GM_getValue("closed",true)==true){
  152. var linkHref=$("html>body>div:eq(0)>div>div>div>div>div:eq(1)>main>div>div>div:eq(1)>ul>li:eq("+i+")>a").attr("href");
  153. var sessionID=linkHref.split("/training-sessions/")[1];//the number after /training-sessions/
  154. var checkedSessionsJSON=JSON.parse(GM_getValue("checkedSessions","{}"));
  155. //currentHrefs[sessionID]=="checked";
  156. //var pTotal=parseInt(GM_getValue("total",0),10);//previous total for finding how many new minutes from session
  157.  
  158. if(!(sessionID in checkedSessionsJSON)){//if didnt check session already - if it doesnt exist in object
  159. //checkedSessionsJSON[sessionID]="checked";//add current sessionID to JSON
  160. GM_setValue("checkedSessions",JSON.stringify(checkedSessionsJSON));//GM_setValue can not store arrays so stringify and parse are used.
  161. /////////
  162. window.open(linkHref);
  163. //var nTotal=parseInt(GM_getValue("total",0),10);//new total for finding how many new minutes from session
  164. //var NewWords=nTotal-pTotal;
  165. GM_setValue("closed",false);
  166. GM_getValue("newWordsThisSession",69420).then((result)=>{
  167. $("html>body>div:eq(0)>div>div>div>div>div:eq(1)>main>div>div>div:eq(1)>ul>li:eq("+i+")>a>div>div>div:eq(1)>div>p>span:eq(0)").html("new words: "+result);
  168. checkedSessionsJSON[sessionID]=result;
  169. updateText(parseInt(GM_getValue("total",0),10));
  170. GM_setValue("checkedSessions",JSON.stringify(checkedSessionsJSON));
  171. });
  172.  
  173.  
  174. }else{
  175. GM_setValue("checkedSessions",JSON.stringify(checkedSessionsJSON));
  176. $("html>body>div:eq(0)>div>div>div>div>div:eq(1)>main>div>div>div:eq(1)>ul>li:eq("+i+")>a>div>div>div:eq(1)>div>p>span:eq(0)").html("new words: "+checkedSessionsJSON[sessionID]);
  177. updateText(parseInt(GM_getValue("total",0),10));
  178. GM_setValue("checkedSessions",JSON.stringify(checkedSessionsJSON));
  179. }
  180. i++;
  181. updateText(parseInt(GM_getValue("total",0),10));
  182. }
  183. }
  184. else{
  185. /*for(var id in checkedSessionsJSON){//scuffed and doesnt work
  186. //check if there are sessions that are contributing to the total word counter but are from a time before two days ago
  187. if(!(currentHrefs[id]=="checked")){
  188. //subtract minutes in that session from total
  189. GM_setValue("subtract",true);
  190. window.open("https://membean.com/dashboard/training-sessions/"+id);
  191. delete checkedSessionsJSON[id];
  192. GM_setValue("checkedSessions",JSON.stringify(checkedSessionsJSON));
  193. updateText(parseInt(GM_getValue("total",0),10));
  194. }
  195. }
  196. */
  197. GM_setValue("checkedSessions",JSON.stringify(checkedSessionsJSON));
  198. updateText(parseInt(GM_getValue("total",0),10));
  199. clearInterval(intervaal);
  200. }
  201. },50);
  202. clearInterval(intrval);
  203. }
  204. },1000);
  205.  
  206. }
  207. function updateText(a){
  208. var jqTHText="html>body>div:eq(0)>div>div>div>div>div:eq(0)>div>div:eq(1)>h1";
  209. if($(jqTHText).text!="Training History |\n"+a+" new words in the past 2 weeks"){
  210. $(jqTHText).text("Training History |\n"+a+" new words in the past 2 weeks");
  211. }
  212. }
  213. function makeButton(){
  214. var button = document.createElement('button');
  215. button.style.top = 0;
  216. button.style.left = 0;
  217. button.style.width = 50;
  218. button.style.height = 50;
  219. button.style.position = "fixed";
  220. button.style.color="#FFFFFF";
  221. button.style.background="#FF0000";
  222. //if(GM_getValue("buttonOn",false)==true){
  223. // button.innerHTML="enable no wrong words";
  224. //}else{
  225. button.innerHTML="disable no wrong words";
  226. //}
  227. button.id="toggleGodMode";
  228. button.classList.add("draggable");
  229. button.setAttribute("onClick", "if(getElementById(\"toggleGodMode\").innerHTML==\"enable no wrong words\"){getElementById(\"toggleGodMode\").innerHTML=\"disable no wrong words\";}else{getElementById(\"toggleGodMode\").innerHTML=\"enable no wrong words\";}");
  230. var $draggable = $('.draggable').draggabilly({
  231. // options...
  232. })
  233. document.body.appendChild(button);
  234. setInterval(()=>{
  235. if(document.getElementById("toggleGodMode").innerHTML=="enable no wrong words"||GM_getValue("buttonOn",false)!=true){
  236. GM_setValue("buttonOn",true);
  237. }else if(document.getElementById("toggleGodMode").innerHTML=="disable no wrong words"||GM_getValue("buttonOn",false)!=false){
  238. GM_setValue("buttonOn",false);
  239. }
  240. },500);
  241.  
  242. }
  243. function randInt(min, max) {
  244. return Math.floor(Math.random() * (max - min + 1) ) + min;
  245. }
  246. function rand(min,max){
  247. return (Math.random() * (min - max) + max).toFixed(2);
  248. }
  249. //https://www.w3schools.com/js/js_cookies.asp
  250. function setCookie(cname, cvalue, exdays) {
  251. var d = new Date();
  252. d.setTime(d.getTime() + (exdays * 24 * 60 * 60 * 1000));
  253. var expires = "expires="+d.toUTCString();
  254. document.cookie = cname + "=" + cvalue + ";" + expires + ";path=/";
  255. }
  256. function getCookie(cname) {
  257. var name = cname + "=";
  258. var ca = document.cookie.split(';');
  259. for(var i = 0; i < ca.length; i++) {
  260. var c = ca[i];
  261. while (c.charAt(0) == ' ') {
  262. c = c.substring(1);
  263. }
  264. if (c.indexOf(name) == 0) {
  265. return c.substring(name.length, c.length);
  266. }
  267. }
  268. return "";
  269. }
  270.  
  271. });
  272. })();
  273.  
  274.  
  275.  
  276.  
  277.  
  278.