Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // ==UserScript==
- // @name Dreadhacked
- // @namespace http://tampermonkey.net/
- // @version 3.6.0
- // @description try to take over the world!
- // @author l33th4xx0r, M1tn1ck
- // @match http://www.dreadcast.net/Main
- // @grant none
- // ==/UserScript==
- //*******************************************
- //*****************DIGICODE******************
- //*******************************************
- (function() {
- 'use strict';
- var requestArray = [];
- var isAlreadyCracking = false;
- var deckRequestArray = [];
- var isAlreadyForcing = false;
- function analyzeDigiRequest(firstDigits, missingDigits, i) {
- return function(data, textStatus, jqXHR) {
- //console.log("Answer:", data, ", call", i);
- $("#digiTry").html(('00' + i).substr(-missingDigits));
- if(data === "true") {
- $("#digiCombi").css("color", "lightgreen");
- $("#digiCombi").html(('00' + i).substr(-missingDigits));
- requestArray.forEach(function(item, index){item.abort();});
- }
- if(data === "true" || i == Math.pow(10, missingDigits)-1) {isAlreadyCracking = false; isAlreadyForcing = false;}
- };
- }
- function bruteForce(firstDigits, missingDigits) {
- for(var i = 0; i < Math.pow(10, missingDigits); i++) {
- requestArray[i] = $.ajax({
- async: true,
- type: 'POST',
- url: 'Check/Digicode/Zone=' + $("#zoneDigi").val(),
- data: "lb_textinput_digicode="+ firstDigits + ('00' + i).substr(-missingDigits),
- success: analyzeDigiRequest(firstDigits, missingDigits, i)
- });
- }
- }
- function analyzeDeckRequest(i) {
- return function(data, textStatus, jqXHR) {
- //console.log("Deck Request done.");
- var dataText = $(data).find("texte").text().match(/\d+\*+/);
- $("#digiFirst").html(('000' + Math.floor(Math.random() * 10000)).substr(-4));
- if(!isAlreadyForcing) {
- if(dataText !== null) {
- var rep = dataText[0];
- if(rep.indexOf("\*") >= Math.ceil(rep.length / 2)) {
- isAlreadyForcing = true;
- //console.log(rep);
- deckRequestArray.forEach(function(item, index){item.abort();});
- //console.log("Début digi:", rep.substr(0, rep.indexOf("\*")));
- $("#digiFirst").html(rep.substr(0, rep.indexOf("\*")));
- $("#digiFirst").css("color", "lightgreen");
- bruteForce(rep.substr(0, rep.indexOf("\*")), rep.length - rep.indexOf("\*"));
- }
- }
- if(i == 99) {
- deckRequestArray.forEach(function(item, index){item.abort();});
- launchDeckBatch();
- }
- }
- };
- }
- function launchDeckBatch() {
- for(var h = 0; h < 100; h++) {
- deckRequestArray[h] = $.ajax({
- async: true,
- type: 'POST',
- url: 'Deck/Command',
- data: "commande=digicode "+ $("#structureDigi").val() +"&id_deck=1",
- dataType: "xml",
- success: analyzeDeckRequest(h)
- });
- }
- }
- function crackDigi() {
- if(!isAlreadyCracking) {
- isAlreadyCracking = true;
- $("#digiFirst").css("color", "yellow");
- $("#digiCombi").css("color", "yellow");
- launchDeckBatch();
- }
- }
- var $crackContainer = $('<div id="crackDigi"></div>');
- $crackContainer.css({
- position: "absolute",
- top: "210px",
- left: "3px",
- 'background-color': "black",
- border: "1px solid gray",
- padding: "5px",
- 'text-align': "center",
- 'z-index': "99999"
- }).appendTo($("body"));
- $(`<div id="digiFirst">xxxx</div>
- <div id="digiCombi">xxx</div>
- <div id="digiTry">xxx</div>
- <div id="digiFields">
- <p>Z: </p><input id="zoneDigi" type="number" min="1" max="9" value="1"><br/>
- <p>S: </p><input id="structureDigi" type="number" min="1" max="9" value="1">
- </div>
- <button id="digiStart" title="Digicode">Start Hack!</button>`).appendTo($crackContainer);
- $("#digiFirst").css("color", "yellow");
- $("#digiCombi").css("color", "yellow");
- $("#digiTry").css("color", "red");
- $("#digiFirst, #digiCombi").css({display: "inline"});
- $("#digiFields").css({
- color: "lightgreen",
- "font-size": "12px"
- });
- $("#digiFields > p").css("display", "inline");
- $("#zoneDigi, #structureDigi, #digiStart").css({
- 'background-color': "white",
- 'margin-top': "4px"
- });
- $("#zoneDigi, #structureDigi").css({
- display: "inline",
- 'text-align': "right"
- });
- $("#digiStart").click(crackDigi);
- })();
- //*******************************************
- //******************MEUBLE*******************
- //*******************************************
- (function() {
- 'use strict';
- var meubleRequestArray = [];
- var isAlreadyForcingMeuble = false;
- function analyzeMeubleRequest(i) {
- return function(data, textStatus, jqXHR) {
- var isGoodDigicode = $(data).find("resultat").attr("value");
- //console.log("Answer:", isGoodDigicode, ", call: ", ('00' + i).substr(-3));
- if(isGoodDigicode == "true") {
- $("#meubleCombi").css("color", "lightgreen");
- $("#meubleCombi").html(('00' + i).substr(-3));
- //engine.openDataBox("Main/DataBox/default=Digging&id=" + $(data).find("id_meuble").xml());
- /*$.post("Item/Update/DigicodeFurniture", {
- id_meuble: $("#Meuble").val(),
- valeur: "000"
- });*/
- meubleRequestArray.forEach(function(item, index){item.abort();});
- }
- if(isGoodDigicode == "true" || i == 999) {
- isAlreadyForcingMeuble = false;
- }
- };
- }
- function bruteForceMeuble() {
- if(!isAlreadyForcingMeuble) {
- isAlreadyForcingMeuble = true;
- $("#meubleCombi").css("color", "yellow");
- for(var i = 0; i < 1000; i++) {
- meubleRequestArray[i] = $.ajax({
- async: true,
- type: 'POST',
- url: 'Check/Digicode/Meuble=' + $("#Meuble").val(),
- data: "lb_textinput_digicode-meuble=" + ('00000' + i).substr(-6),
- dataType: "xml",
- success: analyzeMeubleRequest(i),
- });
- }
- }
- }
- var $crackContainerMeuble = $('<div id="crackDigiMeuble"></div>');
- $crackContainerMeuble.css({
- position: "absolute",
- top: "330px",
- left: "3px",
- 'background-color': "black",
- border: "1px solid gray",
- padding: "5px",
- 'text-align': "center",
- 'z-index': "99999"
- }).appendTo($("body"));
- $(`<div id="meubleCombi">xxx</div><input id="Meuble" type="text" value="000000"><button id="digiStartMeuble" title="Coffre-fort">Start Hack!</button>`).appendTo($crackContainerMeuble);
- $("#meubleCombi").css("color", "yellow");
- $("#Meuble, #digiStartMeuble").css({
- width: "50px",
- 'background-color': "white",
- 'margin-top': "4px"
- });
- $("#Meuble").css({
- display: "block",
- 'text-align': "right"
- });
- $("#digiStartMeuble").click(bruteForceMeuble);
- })();
- //*******************************************
- //*****************MIRROIR*******************
- //*******************************************
- (function() {
- 'use strict';
- function getFiche() {
- $.ajax({
- async: true,
- type: 'POST',
- url: 'Deck/Command',
- data: "commande=idpersonnage "+ ($("#Personnage").val() === "" ? $("#txt_pseudo").text() : $("#Personnage").val()) +"&id_deck=1",
- dataType: "xml",
- success: function(data, textStatus, jqXHR) {
- var dataText = $(data).find("texte").text();
- if(dataText.search(/^\d+/) > -1) {
- Engine.prototype.openPersoBox(dataText);
- $("#Personnage").css("color", "#111");
- }
- else {
- $("#Personnage").css("color", "red");
- }
- $.ajax({
- async: true,
- type: 'POST',
- url: 'Action/Rest'
- });
- }
- });
- }
- var $Mirror = $('<div id="Mirror"></div>');
- $Mirror.css({
- position: "absolute",
- top: "482px",
- left: "3px",
- 'background-color': "black",
- border: "1px solid gray",
- padding: "5px",
- 'text-align': "center",
- 'z-index': "99999"
- }).appendTo($("body"));
- $(`<input id="Personnage" type="text" value=""></br><button id="Mirroring" title="Identifier">Fiche</button>`).appendTo($Mirror);
- $("#Mirroring, #Personnage").css({
- width: "50px",
- 'background-color': "white",
- 'margin-top': "4px"});
- $("#Mirroring").click(getFiche);
- })();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement