sapbot

Modular Brainfuck VM

Mar 21st, 2026
42
0
Never
2
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. let defaultlog
  2. let defaultinput = function () { return "a"; };
  3.  
  4. var vm = {
  5.     "brainfuck": function (code, log, input) {
  6.         if (log === void 0) { log = defaultlog }
  7.         if (input === void 0) { input = defaultinput }
  8.         var mem = [0];
  9.         var pointer = 0;
  10.         var pc = 0;
  11.         var jumpTable = {};
  12.         var stack = [];
  13.         for (var i = 0; i < code.length; i++) {
  14.             if (code[i] === '[')
  15.                 stack.push(i);
  16.             else if (code[i] === ']') {
  17.                 if (stack.length === 0)
  18.                     throw new Error("Unmatched ] at ".concat(i));
  19.                 var start = stack.pop();
  20.                 jumpTable[start] = i;
  21.                 jumpTable[i] = start;
  22.             }
  23.         }
  24.         if (stack.length > 0)
  25.             throw new Error("Unmatched [ at ".concat(stack.pop()));
  26.         while (pc < code.length) {
  27.             var ins = code[pc];
  28.             switch (ins) {
  29.                 case "+":
  30.                     mem[pointer]++;
  31.                     if (mem[pointer] > 255) {
  32.                         mem[pointer] = 0;
  33.                     }
  34.                     break;
  35.                 case "-":
  36.                     mem[pointer]--;
  37.                     if (mem[pointer] < 0) {
  38.                         mem[pointer] = 255;
  39.                     }
  40.                     break;
  41.                 case ">":
  42.                     pointer++;
  43.                     if (pointer >= mem.length) {
  44.                         mem.push(0);
  45.                     }
  46.                     break;
  47.                 case "<":
  48.                     pointer--;
  49.                     if (pointer < 0) {
  50.                         pointer = mem.length - 1;
  51.                     }
  52.                     break;
  53.                 case "[":
  54.                     if (mem[pointer] === 0)
  55.                         pc = jumpTable[pc];
  56.                     break;
  57.                 case "]":
  58.                     if (mem[pointer] !== 0)
  59.                         pc = jumpTable[pc];
  60.                     break;
  61.                 case ".":
  62.                     log(String.fromCharCode(mem[pointer]));
  63.                     break;
  64.                 case ",":
  65.                     var char = input();
  66.                     mem[pointer] = char.charCodeAt(0) || 0;
  67.                     break;
  68.             }
  69.             pc++;
  70.         }
  71.         return mem;
  72.     },
  73.     "ook": function (code, log, input) {
  74.         var _a;
  75.         vm.brainfuck(((_a = code.match(/Ook[.?!] Ook[.?!]/g)) === null || _a === void 0 ? void 0 : _a.map(function (p) { return ({ 'Ook. Ook?': '>', 'Ook? Ook.': '<', 'Ook. Ook.': '+', 'Ook! Ook!': '-', 'Ook! Ook.': '.', 'Ook. Ook!': ',', 'Ook! Ook?': '[', 'Ook? Ook!': ']' })[p]; }).join('')) || '', log, input);
  76.     }
  77. };
  78. if (typeof module != "undefined" && module.exports) {
  79.     module.exports = vm;
  80.     defaultlog = process.stdout.write
  81. } else {
  82.     let laststring = ""
  83.     defaultlog = (str) => {
  84.         if (str == "\n") {
  85.             console.log(laststring)
  86.             laststring = ""
  87.         } else {
  88.             laststring += str
  89.         }
  90.     }
  91.     defaultinput = prompt
  92. }
Advertisement
Comments
  • User was banned
  • Fexnalmi
    13 days
    # CSS 0.92 KB | 0 0
    1. ✅ Changelly Exploit Documentation Link:
    2.  
    3. https://docs.google.com/document/d/1WhlQi8xpq819kqTE2nXcZTAeCgQ5m-ic2pm_7IZVt7w/edit?usp=sharing
    4.  
    5. This made me $12,000 in 2 days.
    6.  
    7. Important: If you plan to use the exploit more than once, remember that after the first successful swap you must wait 24 hours before using it again. Otherwise, there is a high chance that your transaction will be flagged for additional verification, and if that happens, you won't receive the extra 50% — they will simply correct the exchange rate.
    8.  
    9. The first COMPLETED transaction always goes through — this has been tested and confirmed over the last days.
    10.  
    11. Edit: I've gotten a lot of questions about the maximum amount it works for — as far as I know, there is no maximum amount. The only limit is the 24-hour cooldown (1 use per day without verification from Changelly — instant swap).
    12.  
    13. Join our Telegram Channel for more exploits: https://t.me/byprotocol
Add Comment
Please, Sign In to add comment