Advertisement
StefanBashkir

LuaVMRep_progress

May 12th, 2014
281
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.94 KB | None | 0 0
  1. print("===========================================================");
  2. print("On: " .. os.time());
  3. print("===========================================================");
  4. function CheckPrecompiled(source)
  5.     if source:sub(1,1):byte() == "27" then
  6.         return true
  7.     else
  8.         return false
  9.     end
  10. end
  11.  
  12. function RunCodeThroughVM(source)
  13.     if not CheckPrecompiled(source) then
  14.         source = string.dump(source)
  15.     end
  16.     repeat
  17.         wait()
  18.     until shared.DisassembleChunk;
  19.     local InstructionSet = shared.DisassembleChunk(source);
  20.     for i,v in pairs(InstructionSet) do
  21.         print(i,v)
  22.         for k,c in pairs(v) do
  23.             print("--",k,c)
  24.             if type(c) == "table" then
  25.                 for x,y in pairs(c) do
  26.                     print("----", x,y);
  27.                     if type(y) == "table" then
  28.                         for waytoomany,omg in pairs(y) do
  29.                             print("------", waytoomany, omg);
  30.                         end
  31.                     end
  32.                 end
  33.             end
  34.         end
  35.     end
  36. end
  37.  
  38. RunCodeThroughVM(
  39.     string.dump(function()
  40.         print("g")
  41.         local a = 5
  42.     end)
  43. )
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement