Decrypt a code (so I understand it is in ASCII)

1

Well, basically I would like to know if there is any way to transform a script written in ASCII into Characters and if so, how would I transform it?

Code (1)

 local code = '7
  minimize = true -- minimizar a mainbp?
  bps = 1 -- quantidade de bps, deixar em 8
  local lastTime = os.clock()
  local main = Container.GetFirst()
  Module.New("reconnect", function()   
  if (os.difftime(os.clock(), lastTime) >= 1) then      
  local ping = Self.Ping()        
  while (#Container.GetAll() < bps) do      
  Cavebot.Stop()        
  Self.CloseContainers()        
  wait(2000)       
  Self.OpenMainBackpack(minimize)            
  wait(ping + 1000)     
  Cavebot.Start()           
  end    
  end    
  lastTime = os.clock()
  end)
  local script = string.dump(
  function()
  minimize = true -- minimizar a mainbp?
  bps = 1 -- quantidade de bps, deixar em 8
  local lastTime = os.clock()
  local main = Container.GetFirst()
  Module.New("reconnect", function()
  if (os.difftime(os.clock(), lastTime) >= 1) then
  local ping = Self.Ping()
  while (#Container.GetAll() < bps) do  
  Cavebot.Stop()
  Self.CloseContainers()    
  wait(2000)
  Self.OpenMainBackpack(minimize)    
  wait(ping + 1000)     
  Cavebot.Start()     
  end
  end
  lastTime = os.clock()
  end)

  end
  )

  buff=""
  for v=1,string.len(script) do --Convert our string into a hex string.
  buff=buff..'\'..string.byte(script,v)
  end

  file=io.open('encrypted.txt','w') --Output our bytecode into ascii format to encrypted.txt
  file:write(buff)
  file:flush()
  file:close()
 local code = '7
  minimize = true -- minimizar a mainbp?
  bps = 1 -- quantidade de bps, deixar em 8
  local lastTime = os.clock()
  local main = Container.GetFirst()
  Module.New("reconnect", function()   
  if (os.difftime(os.clock(), lastTime) >= 1) then      
  local ping = Self.Ping()        
  while (#Container.GetAll() < bps) do      
  Cavebot.Stop()        
  Self.CloseContainers()        
  wait(2000)       
  Self.OpenMainBackpack(minimize)            
  wait(ping + 1000)     
  Cavebot.Start()           
  end    
  end    
  lastTime = os.clock()
  end)
  local script = string.dump(
  function()
  minimize = true -- minimizar a mainbp?
  bps = 1 -- quantidade de bps, deixar em 8
  local lastTime = os.clock()
  local main = Container.GetFirst()
  Module.New("reconnect", function()
  if (os.difftime(os.clock(), lastTime) >= 1) then
  local ping = Self.Ping()
  while (#Container.GetAll() < bps) do  
  Cavebot.Stop()
  Self.CloseContainers()    
  wait(2000)
  Self.OpenMainBackpack(minimize)    
  wait(ping + 1000)     
  Cavebot.Start()     
  end
  end
  lastTime = os.clock()
  end)

  end
  )

  buff=""
  for v=1,string.len(script) do --Convert our string into a hex string.
  buff=buff..'\'..string.byte(script,v)
  end

  file=io.open('encrypted.txt','w') --Output our bytecode into ascii format to encrypted.txt
  file:write(buff)
  file:flush()
  file:close()
%pre%%pre%%pre%5145611610116452656%pre%%pre%%pre%%pre%%pre%%pre%%pre%%pre%%pre%%pre%%pre%%pre%%pre%%pre%8%pre%%pre%%pre%%pre%8%pre%%pre%%pre%%pre%2%pre%%pre%%pre%%pre%88%pre%%pre%83%pre%88%pre%32%pre%4%pre%3%pre%%pre%%pre%%pre%%pre%%pre%%pre%68%pre%8%pre%%pre%%pre%%pre%%pre%%pre%%pre%95059521%pre%%pre%%pre%%pre%25%pre%%pre%%pre%%pre%%pre%%pre%%pre%0%pre%%pre%%pre%15%pre%%pre%%pre%%pre%817%pre%%pre%%pre%%pre%1065014%pre%%pre%%pre%%pre%165456%pre%%pre%%pre%%pre%10781%pre%%pre%%pre%%pre%19%pre%%pre%%pre%%pre%4110016%pre%%pre%%pre%%pre%%pre%%pre%%pre%%pre%%pre%%pre%%pre%%pre%%pre%%pre%%pre%%pre%%pre%%pre%%pre%%pre%%pre%%pre%%pre%%pre%%pre%%pre%82%pre%88%pre%2%pre%%pre%%pre%88%pre%898%pre%%pre%%pre%88%pre%8%pre%23%pre%88%pre%%pre%8%pre%3%pre%%pre%88%pre%28%pre%84%pre%8%pre%%pre%%pre%24%pre%8%pre%%pre%%pre%9%pre%%pre%%pre%%pre%85%pre%32%pre%%pre%%pre%%pre%0%pre%%pre%%pre%%pre%6%pre%8%pre%%pre%97%pre%%pre%%pre%8%pre%88%pre%%pre%%pre%%pre%%pre%8%pre%%pre%%pre%%pre%%pre%%pre%%pre%15%pre%%pre%%pre%%pre%05226591%pre%%pre%%pre%%pre%817%pre%%pre%%pre%%pre%%pre%%pre%%pre%0%pre%%pre%%pre%182%pre%%pre%%pre%%pre%503%pre%%pre%%pre%%pre%1065014%pre%%pre%%pre%%pre%1688%pre%%pre%%pre%%pre%25%pre%%pre%%pre%%pre%8116%pre%%pre%%pre%%pre%612%pre%%pre%%pre%%pre%815110650145%pre%%pre%%pre%%pre%956%pre%%pre%%pre%%pre%%pre%%pre%9%pre%%pre%%pre%21050727%pre%%pre%%pre%%pre%95059521%pre%%pre%%pre%%pre%%pre%%pre%3%pre%%pre%%pre%646%pre%%pre%%pre%%pre%%pre%%pre%%pre%%pre%%pre%%pre%%pre%%pre%%pre%%pre%%pre%%pre%%pre%%pre%%pre%%pre%%pre%%pre%%pre%%pre%%pre%%pre%%pre%%pre%%pre%%pre%%pre%%pre%%pre%%pre%%pre%%pre%%pre%%pre%%pre%%pre%%pre%%pre%%pre%%pre%%pre%%pre%%pre%%pre%%pre%%pre%%pre%%pre%%pre%%pre%%pre%%pre%%pre%%pre%%pre%%pre%%pre%%pre%%pre%%pre%%pre%%pre%%pre%%pre%%pre%%pre%%pre%%pre%%pre%%pre%%pre%%pre%%pre%%pre%%pre%%pre%%pre%%pre%%pre%%pre%%pre%%pre%%pre%%pre%%pre%%pre%%pre%%pre%%pre%%pre%%pre%%pre%%pre%%pre%%pre%%pre%%pre%%pre%%pre%%pre%%pre%%pre%%pre%%pre%%pre%%pre%%pre%%pre%%pre%%pre%%pre%%pre%%pre%%pre%%pre%%pre%%pre%%pre%%pre%%pre%%pre%%pre%%pre%%pre%%pre%%pre%%pre%%pre%%pre%%pre%%pre%%pre%%pre%%pre%%pre%%pre%%pre%%pre%%pre%%pre%%pre%%pre%2503%pre%%pre%%pre%%pre%%pre%%pre%%pre%%pre%%pre%%pre%%pre%%pre%%pre%856591%pre%%pre%%pre%%pre%%pre%%pre%%pre%%pre%%pre%%pre%%pre%%pre%%pre%%pre%%pre%%pre%%pre%%pre%%pre%%pre%%pre%%pre%%pre%%pre%%pre%%pre%%pre%%pre%%pre%%pre%%pre%%pre%%pre%%pre%%pre%%pre%%pre%%pre%%pre%%pre%%pre%%pre%%pre%%pre%%pre%%pre%%pre%%pre%%pre%%pre%%pre%%pre%%pre%%pre%%pre%%pre%%pre%%pre%%pre%%pre%%pre%856591%pre%%pre%%pre%%pre%%pre%%pre%%pre%%pre%%pre%%pre%950%pre%%pre%%pre%%pre%%pre%%pre%%pre%%pre%%pre%%pre%%pre%' loadstring(code) ()
%pre%%pre%5145611610116452656%pre%%pre%%pre%%pre%%pre%%pre%%pre%%pre%%pre%%pre%%pre%%pre%%pre%%pre%8%pre%%pre%%pre%%pre%8%pre%%pre%%pre%%pre%2%pre%%pre%%pre%%pre%88%pre%%pre%83%pre%88%pre%32%pre%4%pre%3%pre%%pre%%pre%%pre%%pre%%pre%%pre%68%pre%8%pre%%pre%%pre%%pre%%pre%%pre%%pre%95059521%pre%%pre%%pre%%pre%25%pre%%pre%%pre%%pre%%pre%%pre%%pre%0%pre%%pre%%pre%15%pre%%pre%%pre%%pre%817%pre%%pre%%pre%%pre%1065014%pre%%pre%%pre%%pre%165456%pre%%pre%%pre%%pre%10781%pre%%pre%%pre%%pre%19%pre%%pre%%pre%%pre%4110016%pre%%pre%%pre%%pre%%pre%%pre%%pre%%pre%%pre%%pre%%pre%%pre%%pre%%pre%%pre%%pre%%pre%%pre%%pre%%pre%%pre%%pre%%pre%%pre%%pre%%pre%82%pre%88%pre%2%pre%%pre%%pre%88%pre%898%pre%%pre%%pre%88%pre%8%pre%23%pre%88%pre%%pre%8%pre%3%pre%%pre%88%pre%28%pre%84%pre%8%pre%%pre%%pre%24%pre%8%pre%%pre%%pre%9%pre%%pre%%pre%%pre%85%pre%32%pre%%pre%%pre%%pre%0%pre%%pre%%pre%%pre%6%pre%8%pre%%pre%97%pre%%pre%%pre%8%pre%88%pre%%pre%%pre%%pre%%pre%8%pre%%pre%%pre%%pre%%pre%%pre%%pre%15%pre%%pre%%pre%%pre%05226591%pre%%pre%%pre%%pre%817%pre%%pre%%pre%%pre%%pre%%pre%%pre%0%pre%%pre%%pre%182%pre%%pre%%pre%%pre%503%pre%%pre%%pre%%pre%1065014%pre%%pre%%pre%%pre%1688%pre%%pre%%pre%%pre%25%pre%%pre%%pre%%pre%8116%pre%%pre%%pre%%pre%612%pre%%pre%%pre%%pre%815110650145%pre%%pre%%pre%%pre%956%pre%%pre%%pre%%pre%%pre%%pre%9%pre%%pre%%pre%21050727%pre%%pre%%pre%%pre%95059521%pre%%pre%%pre%%pre%%pre%%pre%3%pre%%pre%%pre%646%pre%%pre%%pre%%pre%%pre%%pre%%pre%%pre%%pre%%pre%%pre%%pre%%pre%%pre%%pre%%pre%%pre%%pre%%pre%%pre%%pre%%pre%%pre%%pre%%pre%%pre%%pre%%pre%%pre%%pre%%pre%%pre%%pre%%pre%%pre%%pre%%pre%%pre%%pre%%pre%%pre%%pre%%pre%%pre%%pre%%pre%%pre%%pre%%pre%%pre%%pre%%pre%%pre%%pre%%pre%%pre%%pre%%pre%%pre%%pre%%pre%%pre%%pre%%pre%%pre%%pre%%pre%%pre%%pre%%pre%%pre%%pre%%pre%%pre%%pre%%pre%%pre%%pre%%pre%%pre%%pre%%pre%%pre%%pre%%pre%%pre%%pre%%pre%%pre%%pre%%pre%%pre%%pre%%pre%%pre%%pre%%pre%%pre%%pre%%pre%%pre%%pre%%pre%%pre%%pre%%pre%%pre%%pre%%pre%%pre%%pre%%pre%%pre%%pre%%pre%%pre%%pre%%pre%%pre%%pre%%pre%%pre%%pre%%pre%%pre%%pre%%pre%%pre%%pre%%pre%%pre%%pre%%pre%%pre%%pre%%pre%%pre%%pre%%pre%%pre%%pre%%pre%%pre%%pre%%pre%%pre%2503%pre%%pre%%pre%%pre%%pre%%pre%%pre%%pre%%pre%%pre%%pre%%pre%%pre%856591%pre%%pre%%pre%%pre%%pre%%pre%%pre%%pre%%pre%%pre%%pre%%pre%%pre%%pre%%pre%%pre%%pre%%pre%%pre%%pre%%pre%%pre%%pre%%pre%%pre%%pre%%pre%%pre%%pre%%pre%%pre%%pre%%pre%%pre%%pre%%pre%%pre%%pre%%pre%%pre%%pre%%pre%%pre%%pre%%pre%%pre%%pre%%pre%%pre%%pre%%pre%%pre%%pre%%pre%%pre%%pre%%pre%%pre%%pre%%pre%%pre%856591%pre%%pre%%pre%%pre%%pre%%pre%%pre%%pre%%pre%%pre%950%pre%%pre%%pre%%pre%%pre%%pre%%pre%%pre%%pre%%pre%%pre%' loadstring(code) ()

This code in numbers above, is equivalent to the code below:

Code (2)

%pre%

I have run this script to transform the code into characters (2) for the ASCII (1) code

Code (3)

%pre%     
asked by anonymous 19.07.2016 / 19:04

1 answer

1

As you seem to know, the string in Code 1 is a precompiled version of Code 2. It contains instructions for the Lua virtual machine. You can see a listing by changing Code 1 to io.write(code) , saving the output in a luac.out file, and then running luac -l p .

It is not easy to decompile a precompiled script. You can try using LuaDec for Lua 5.1 .

    
22.07.2016 / 19:37