Advertisement
Guest User

Untitled

a guest
Jan 22nd, 2017
77
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 9.37 KB | None | 0 0
  1. // ==UserScript==
  2. // @name Dreadhacked
  3. // @namespace http://tampermonkey.net/
  4. // @version 3.6.0
  5. // @description try to take over the world!
  6. // @author l33th4xx0r, M1tn1ck
  7. // @match http://www.dreadcast.net/Main
  8. // @grant none
  9. // ==/UserScript==
  10.  
  11.  
  12. //*******************************************
  13. //*****************DIGICODE******************
  14. //*******************************************
  15.  
  16. (function() {
  17. 'use strict';
  18.  
  19. var requestArray = [];
  20. var isAlreadyCracking = false;
  21. var deckRequestArray = [];
  22. var isAlreadyForcing = false;
  23.  
  24. function analyzeDigiRequest(firstDigits, missingDigits, i) {
  25. return function(data, textStatus, jqXHR) {
  26. //console.log("Answer:", data, ", call", i);
  27. $("#digiTry").html(('00' + i).substr(-missingDigits));
  28. if(data === "true") {
  29. $("#digiCombi").css("color", "lightgreen");
  30. $("#digiCombi").html(('00' + i).substr(-missingDigits));
  31. requestArray.forEach(function(item, index){item.abort();});
  32. }
  33. if(data === "true" || i == Math.pow(10, missingDigits)-1) {isAlreadyCracking = false; isAlreadyForcing = false;}
  34. };
  35. }
  36.  
  37. function bruteForce(firstDigits, missingDigits) {
  38. for(var i = 0; i < Math.pow(10, missingDigits); i++) {
  39. requestArray[i] = $.ajax({
  40. async: true,
  41. type: 'POST',
  42. url: 'Check/Digicode/Zone=' + $("#zoneDigi").val(),
  43. data: "lb_textinput_digicode="+ firstDigits + ('00' + i).substr(-missingDigits),
  44. success: analyzeDigiRequest(firstDigits, missingDigits, i)
  45. });
  46. }
  47. }
  48.  
  49. function analyzeDeckRequest(i) {
  50. return function(data, textStatus, jqXHR) {
  51. //console.log("Deck Request done.");
  52. var dataText = $(data).find("texte").text().match(/\d+\*+/);
  53. $("#digiFirst").html(('000' + Math.floor(Math.random() * 10000)).substr(-4));
  54. if(!isAlreadyForcing) {
  55. if(dataText !== null) {
  56. var rep = dataText[0];
  57. if(rep.indexOf("\*") >= Math.ceil(rep.length / 2)) {
  58. isAlreadyForcing = true;
  59. //console.log(rep);
  60. deckRequestArray.forEach(function(item, index){item.abort();});
  61. //console.log("Début digi:", rep.substr(0, rep.indexOf("\*")));
  62. $("#digiFirst").html(rep.substr(0, rep.indexOf("\*")));
  63. $("#digiFirst").css("color", "lightgreen");
  64. bruteForce(rep.substr(0, rep.indexOf("\*")), rep.length - rep.indexOf("\*"));
  65. }
  66. }
  67. if(i == 99) {
  68. deckRequestArray.forEach(function(item, index){item.abort();});
  69. launchDeckBatch();
  70. }
  71. }
  72. };
  73. }
  74.  
  75. function launchDeckBatch() {
  76. for(var h = 0; h < 100; h++) {
  77. deckRequestArray[h] = $.ajax({
  78. async: true,
  79. type: 'POST',
  80. url: 'Deck/Command',
  81. data: "commande=digicode "+ $("#structureDigi").val() +"&id_deck=1",
  82. dataType: "xml",
  83. success: analyzeDeckRequest(h)
  84. });
  85. }
  86. }
  87.  
  88. function crackDigi() {
  89. if(!isAlreadyCracking) {
  90. isAlreadyCracking = true;
  91. $("#digiFirst").css("color", "yellow");
  92. $("#digiCombi").css("color", "yellow");
  93.  
  94. launchDeckBatch();
  95. }
  96. }
  97.  
  98. var $crackContainer = $('<div id="crackDigi"></div>');
  99. $crackContainer.css({
  100. position: "absolute",
  101. top: "210px",
  102. left: "3px",
  103. 'background-color': "black",
  104. border: "1px solid gray",
  105. padding: "5px",
  106. 'text-align': "center",
  107. 'z-index': "99999"
  108. }).appendTo($("body"));
  109.  
  110. $(`<div id="digiFirst">xxxx</div>
  111. <div id="digiCombi">xxx</div>
  112. <div id="digiTry">xxx</div>
  113. <div id="digiFields">
  114. <p>Z: </p><input id="zoneDigi" type="number" min="1" max="9" value="1"><br/>
  115. <p>S: </p><input id="structureDigi" type="number" min="1" max="9" value="1">
  116. </div>
  117. <button id="digiStart" title="Digicode">Start Hack!</button>`).appendTo($crackContainer);
  118.  
  119. $("#digiFirst").css("color", "yellow");
  120. $("#digiCombi").css("color", "yellow");
  121. $("#digiTry").css("color", "red");
  122. $("#digiFirst, #digiCombi").css({display: "inline"});
  123. $("#digiFields").css({
  124. color: "lightgreen",
  125. "font-size": "12px"
  126. });
  127. $("#digiFields > p").css("display", "inline");
  128. $("#zoneDigi, #structureDigi, #digiStart").css({
  129. 'background-color': "white",
  130. 'margin-top': "4px"
  131. });
  132. $("#zoneDigi, #structureDigi").css({
  133. display: "inline",
  134. 'text-align': "right"
  135. });
  136.  
  137. $("#digiStart").click(crackDigi);
  138.  
  139. })();
  140.  
  141.  
  142. //*******************************************
  143. //******************MEUBLE*******************
  144. //*******************************************
  145.  
  146.  
  147. (function() {
  148. 'use strict';
  149.  
  150. var meubleRequestArray = [];
  151. var isAlreadyForcingMeuble = false;
  152.  
  153. function analyzeMeubleRequest(i) {
  154. return function(data, textStatus, jqXHR) {
  155. var isGoodDigicode = $(data).find("resultat").attr("value");
  156. //console.log("Answer:", isGoodDigicode, ", call: ", ('00' + i).substr(-3));
  157. if(isGoodDigicode == "true") {
  158. $("#meubleCombi").css("color", "lightgreen");
  159. $("#meubleCombi").html(('00' + i).substr(-3));
  160. //engine.openDataBox("Main/DataBox/default=Digging&id=" + $(data).find("id_meuble").xml());
  161. /*$.post("Item/Update/DigicodeFurniture", {
  162. id_meuble: $("#Meuble").val(),
  163. valeur: "000"
  164. });*/
  165. meubleRequestArray.forEach(function(item, index){item.abort();});
  166. }
  167. if(isGoodDigicode == "true" || i == 999) {
  168. isAlreadyForcingMeuble = false;
  169. }
  170. };
  171. }
  172.  
  173. function bruteForceMeuble() {
  174. if(!isAlreadyForcingMeuble) {
  175. isAlreadyForcingMeuble = true;
  176. $("#meubleCombi").css("color", "yellow");
  177. for(var i = 0; i < 1000; i++) {
  178. meubleRequestArray[i] = $.ajax({
  179. async: true,
  180. type: 'POST',
  181. url: 'Check/Digicode/Meuble=' + $("#Meuble").val(),
  182. data: "lb_textinput_digicode-meuble=" + ('00000' + i).substr(-6),
  183. dataType: "xml",
  184. success: analyzeMeubleRequest(i),
  185. });
  186. }
  187. }
  188. }
  189.  
  190. var $crackContainerMeuble = $('<div id="crackDigiMeuble"></div>');
  191. $crackContainerMeuble.css({
  192. position: "absolute",
  193. top: "330px",
  194. left: "3px",
  195. 'background-color': "black",
  196. border: "1px solid gray",
  197. padding: "5px",
  198. 'text-align': "center",
  199. 'z-index': "99999"
  200. }).appendTo($("body"));
  201.  
  202. $(`<div id="meubleCombi">xxx</div><input id="Meuble" type="text" value="000000"><button id="digiStartMeuble" title="Coffre-fort">Start Hack!</button>`).appendTo($crackContainerMeuble);
  203.  
  204. $("#meubleCombi").css("color", "yellow");
  205. $("#Meuble, #digiStartMeuble").css({
  206. width: "50px",
  207. 'background-color': "white",
  208. 'margin-top': "4px"
  209. });
  210. $("#Meuble").css({
  211. display: "block",
  212. 'text-align': "right"
  213. });
  214.  
  215. $("#digiStartMeuble").click(bruteForceMeuble);
  216.  
  217. })();
  218.  
  219.  
  220. //*******************************************
  221. //*****************MIRROIR*******************
  222. //*******************************************
  223.  
  224.  
  225. (function() {
  226. 'use strict';
  227.  
  228. function getFiche() {
  229. $.ajax({
  230. async: true,
  231. type: 'POST',
  232. url: 'Deck/Command',
  233. data: "commande=idpersonnage "+ ($("#Personnage").val() === "" ? $("#txt_pseudo").text() : $("#Personnage").val()) +"&id_deck=1",
  234. dataType: "xml",
  235. success: function(data, textStatus, jqXHR) {
  236. var dataText = $(data).find("texte").text();
  237. if(dataText.search(/^\d+/) > -1) {
  238. Engine.prototype.openPersoBox(dataText);
  239. $("#Personnage").css("color", "#111");
  240. }
  241. else {
  242. $("#Personnage").css("color", "red");
  243. }
  244. $.ajax({
  245. async: true,
  246. type: 'POST',
  247. url: 'Action/Rest'
  248. });
  249. }
  250. });
  251. }
  252.  
  253. var $Mirror = $('<div id="Mirror"></div>');
  254. $Mirror.css({
  255. position: "absolute",
  256. top: "482px",
  257. left: "3px",
  258. 'background-color': "black",
  259. border: "1px solid gray",
  260. padding: "5px",
  261. 'text-align': "center",
  262. 'z-index': "99999"
  263. }).appendTo($("body"));
  264.  
  265. $(`<input id="Personnage" type="text" value=""></br><button id="Mirroring" title="Identifier">Fiche</button>`).appendTo($Mirror);
  266.  
  267. $("#Mirroring, #Personnage").css({
  268. width: "50px",
  269. 'background-color': "white",
  270. 'margin-top': "4px"});
  271.  
  272. $("#Mirroring").click(getFiche);
  273. })();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement