Cheat Engine Forum Index Cheat Engine
The Official Site of Cheat Engine
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


encrypted script (trainer) New method
Goto page Previous  1, 2
 
Post new topic   Reply to topic    Cheat Engine Forum Index -> Cheat Engine Lua Scripting
View previous topic :: View next topic  
Author Message
mlmn21
How do I cheat?
Reputation: 0

Joined: 13 Aug 2014
Posts: 9

PostPosted: Sun Jun 18, 2017 7:46 pm    Post subject: Reply with quote

Dark Byte wrote:
i also recomnend encodeFunction to convert your script into native bytecode so it's a lot more difficult


did u mean that ?

Code:
 function scan(enter, exit)
pretemp1 =Scanning.PIDD(enter,7)
pretemp2 =Scanning.PIDD(exit,7)
temp1 = bdc(pretemp1)
temp2 = bdc(pretemp2)
search = Scanning.PIDD(temp1,7)
change = Scanning.PIDD(temp2,7)
     aobs = AOBScan(search, "+W")
     if(aobs == nil) then
      scanCheck=false
    else
       j = stringlist_getCount(aobs)
      for i = 1, j do
          address=stringlist_getString(aobs,i-1)
          for i = 1, string.len(change), 3 do
             z = string.sub(change, i, i+2)
             x, y = string.find(z, "%?+")
              if (x == nil) then
                script=[[
                ]]..address.."+"..(DEC_HEX((i-1)/3))..[[:
                db ]]..z..[[
                ]]
                autoAssemble(script)
             end
          end
       end
      object_destroy(aobs);
      aobs=nil
      scanCheck=true
   end
end
Back to top
View user's profile Send private message
Dark Byte
Site Admin
Reputation: 458

Joined: 09 May 2003
Posts: 25288
Location: The netherlands

PostPosted: Mon Jun 19, 2017 3:46 am    Post subject: Reply with quote

I wasn't talking about this topic, (you want the opposite)

you can just wrap the whole lua script into encodeFunction(function() wholescript end) which returns raw lua bytecode as a string

and when you load it back you use decodeFunction(bytecodestring)() .
there won't be any textform of the script during or after the decode

_________________
Do not ask me about online cheats. I don't know any and wont help finding them.

Like my help? Join me on Patreon so i can keep helping
Back to top
View user's profile Send private message MSN Messenger
mlmn21
How do I cheat?
Reputation: 0

Joined: 13 Aug 2014
Posts: 9

PostPosted: Mon Jun 19, 2017 11:39 am    Post subject: Reply with quote

thx for reply. DB.
Back to top
View user's profile Send private message
mlmn21
How do I cheat?
Reputation: 0

Joined: 13 Aug 2014
Posts: 9

PostPosted: Thu Jun 22, 2017 10:42 am    Post subject: Reply with quote

Dark Byte wrote:
i also recomnend encodeFunction to convert your script into native bytecode so it's a lot more difficult



is that encodefunction ? functionscan. but function browser and function PIDD for what ? thx


Code:

mt = {}
mt[1]= bdc('RWlvQUFHSUxZZ3RtNmdaZ2xTeG03QzRrQVE9PQ==')
mt[2]= bdc('RWdBQUFHSUxZZ3RtNmdaZ2xTeG03QzRrTlE9PQ==')
mt[3]= bdc('RWlvQUFHSU9ZZzVtNmdaZ2xTeG03QzRrQVE9PQ==')
mt[4]= bdc('RWdBQUFHSU9ZZzVtNmdaZ2xTeG03QzRrTlE9PQ==')


function setHack_Information()
t =
{
{'Instant Construction',[[Luacall(scan(mt[1],mt[2]))]]},
{'Gems on Collect',[[Luacall(scan(mt[3],mt[4]))]]},

}
end
 
local function browser(text, key)
   return text:gsub("%a", function(t)
         local base = (t:lower() == t and string.byte('a') or string.byte('A'))

         local r = t:byte() - base
         r = r + key
         r = r%26 -- works correctly even if r is negative
         r = r + base
         return string.char(r)
      end)
end

local function PIDD(text, key)
   return browser(text, -key)
end

Scanning = {
   browser = browser,
   PIDD = PIDD,
}
   
   
   
   
    ------------------------------------------

function DEC_HEX(IN)
   local B,K,OUT,I,D=16,"0123456789ABCDEF","",0
    if IN<1 then
      OUT=0
      return OUT
   end
   while IN>0 do
      I=I+1
      IN,D=math.floor(IN/B),math.fmod(IN,B)+1
      OUT=string.sub(K,D,D)..OUT
   end
   return OUT
end

function scan(enter, exit)
pretemp1 =Scanning.PIDD(enter,12)
pretemp2 =Scanning.PIDD(exit,12)
temp1 = bdc(pretemp1)
temp2 = bdc(pretemp2)
temp3 = Scanning.PIDD(temp1,12)
temp4 = Scanning.PIDD(temp2,12)
search = bdc(temp3)
change = bdc(temp4)
     aobs = AOBScan(search, "+W")
     if(aobs == nil) then
      scanCheck=false
    else
       j = stringlist_getCount(aobs)
      for i = 1, j do
          address=stringlist_getString(aobs,i-1)
          for i = 1, string.len(change), 3 do
             z = string.sub(change, i, i+2)
             x, y = string.find(z, "%?+")
              if (x == nil) then
                script=[[
                ]]..address.."+"..(DEC_HEX((i-1)/3))..[[:
                db ]]..z..[[
                ]]
                autoAssemble(script)
             end
          end
       end
      object_destroy(aobs);
      aobs=nil
      scanCheck=true
   end
end

Back to top
View user's profile Send private message
Corroder
Grandmaster Cheater Supreme
Reputation: 75

Joined: 10 Apr 2015
Posts: 1667

PostPosted: Thu Jun 22, 2017 2:55 pm    Post subject: Reply with quote

read this :

http://forum.cheatengine.org/viewtopic.php?t=602580

_________________
Stealing Code From Stolen Code...
And Admit It.. Hmmm....Typically LOL
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Cheat Engine Forum Index -> Cheat Engine Lua Scripting All times are GMT - 6 Hours
Goto page Previous  1, 2
Page 2 of 2

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group

CE Wiki   IRC (#CEF)   Twitter
Third party websites