SHARE
TWEET

Untitled

a guest May 23rd, 2019 72 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. // Variable Finder (Deobfuscator)
  2.  
  3. consoleref.log( // Please do not remove!
  4.     '%cDeobfuscator created by Parse\nCheck it out -> github.com/parseml/many-deobf',
  5.     'background: green; color: white; display: block; padding-left: 0px;',
  6. );
  7.  
  8. const Deobfuscator = {
  9.     function: (object, string, returnKey) => {
  10.         let keyFound = null;
  11.  
  12.         Object.keys(object).forEach((i) => {
  13.             if(!object[i]) return;
  14.  
  15.             if(object[i].toString().includes(string))
  16.                 keyFound = returnKey ? i : object[i];
  17.         });
  18.  
  19.         Object.keys(Object.getPrototypeOf(object)).forEach((i) => {
  20.             if(!object[i]) return;
  21.  
  22.             if(object[i].toString().includes(string))
  23.                 keyFound = returnKey ? i : object[i];
  24.         });
  25.  
  26.         return keyFound;
  27.     },
  28.     object: (object, string, returnKey) => {
  29.         let keyFound = null;
  30.  
  31.         Object.keys(object).forEach((i) => {
  32.             if(!object[i]) return;
  33.  
  34.             if(Object.keys(object[i]).includes(string))
  35.                 keyFound = returnKey ? i : object[i];
  36.         });
  37.  
  38.         Object.keys(Object.getPrototypeOf(object)).forEach((i) => {
  39.             if(!object[i]) return;
  40.  
  41.             if(Object.keys(Object.getPrototypeOf(object[i])).includes(string))
  42.                 keyFound = returnKey ? i : object[i];
  43.         });
  44.  
  45.         return keyFound;
  46.     },
  47.     variableByLength: (object, length, returnKey) => {
  48.         let keyFound = null;
  49.  
  50.         Object.keys(object).forEach((i) => {
  51.             if(!object[i]) return;
  52.  
  53.             if(object[i].length === length)
  54.                 keyFound = returnKey ? i : object[i];
  55.         });
  56.  
  57.         Object.keys(Object.getPrototypeOf(object)).forEach((i) => {
  58.             if(!object[i]) return;
  59.  
  60.             if(object[i].length === length)
  61.                 keyFound = returnKey ? i : object[i];
  62.         });
  63.  
  64.         return keyFound;
  65.     },
  66.     keyBetween: (func, start, end) => {
  67.         let keyFound = null;
  68.  
  69.         const str = func.toString();
  70.  
  71.         keyFound = str.substring(
  72.             str.lastIndexOf(start) + start.length,
  73.             str.lastIndexOf(end)
  74.         );
  75.  
  76.         return keyFound;
  77.     },
  78.     findByType: (object, type, returnKey) => {
  79.         let keyFound = null;
  80.  
  81.         Object.keys(object).forEach((i) => {
  82.             if(object[i] === null)
  83.                 return;
  84.  
  85.             if(object[i].constructor === type)
  86.                 keyFound = returnKey ? i : object[i];
  87.         });
  88.  
  89.         return keyFound;
  90.     }
  91. };
  92.  
  93. // Obfuscation List
  94.  
  95. ig.game.player = Deobfuscator.object(ig.game, "screenName", false);
  96. ig.game.player.changeName = Deobfuscator.function(ig.game.player, "this.screenName", false);
  97. ig.game.players = Deobfuscator.object(ig.game, "betweenDefaultAndPlayer", false).player;
  98. ig.game.equip = Deobfuscator.object(ig.game, "removeItemFromCollection", false);
  99. ig.game.equip.item = Deobfuscator.function(ig.game.equip, "AnimationSheet(null,d", false);
  100. ig.game.blocks = Deobfuscator.object(ig.game, "lastRequestTimestamps", false);
  101. ig.game.websocket = Deobfuscator.object(ig.game, "binary", false);
  102. ig.game.player.id = Deobfuscator.variableByLength(ig.game.player, 24, false);
  103. id = Deobfuscator.variableByLength(ig.game.player, 24, true);
  104.  
  105. // Functions you can use to speed up programming
  106.  
  107. const idFromScreenName = screenName => {
  108.     updatePlayers();
  109.     const key = Deobfuscator.variableByLength(ig.game.player, 24, true);
  110.     return new Promise((res, rej) => {
  111.         ig.game.players.forEach(player => {
  112.             if(player.screenName === screenName) {
  113.                 res(player[key]);
  114.             }
  115.         });
  116.  
  117.         rej('Player not found!');
  118.     });
  119. }
  120.  
  121. const updatePlayers = () => {
  122.     ig.game.players = Deobfuscator.object(ig.game, "betweenDefaultAndPlayer", false).player;
  123. }
  124.  
  125. const getPlayerChat = target => {
  126.     updatePlayers();
  127.     let chat = "";
  128.  
  129.     ig.game.players.forEach(player => {
  130.         if(player[id] === target) {
  131.             let playerChat = Deobfuscator.object(player, 'player', false);
  132.             playerChat.object = Deobfuscator.findByType(playerChat, Array, false);
  133.  
  134.             if(playerChat.object.length != 0) {
  135.                 let index = playerChat.object.length - 1;
  136.                 chat = Deobfuscator.findByType(playerChat.object[index], String, false);
  137.             }
  138.         }
  139.     });
  140.  
  141.     return chat;
  142. }
  143.  
  144. const itemInformation = async id => {
  145.     const api = 'http://idf.manyland.netdna-cdn.com/';
  146.     return new Promise((res, rej) => {
  147.         $.get(api + id, (data, code) => {
  148.             if(code === 'success') res(data);
  149.             else rej('Something went wrong!');
  150.         });
  151.     });
  152. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top