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 


Trainer was cracked

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> Cheat Engine
View previous topic :: View next topic  
Author Message
eigocc
Newbie cheater
Reputation: 0

Joined: 22 Dec 2018
Posts: 15

PostPosted: Fri May 17, 2019 12:07 am    Post subject: Trainer was cracked Reply with quote

After the packaged exe program runs, you can see the CT table in memory, so you can extract it directly and re-modify it, and then package it again. Is there any way to delete the text data of the CT table after the program runs?


QQ截图20190517140724.png
 Description:
 Filesize:  118.38 KB
 Viewed:  1727 Time(s)

QQ截图20190517140724.png


Back to top
View user's profile Send private message Send e-mail
Dark Byte
Site Admin
Reputation: 457

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

PostPosted: Fri May 17, 2019 12:16 am    Post subject: Reply with quote

try encodeFunction/decodeFunction for the luascript part

Code:

local r=messageDialog('Have you made a backup of your script?',mtWarning,mbYes,mbNo)
if r==mrYes then
  if LuaScriptForm==nil then
    for i=1,getFormCount()-1 do
      local f=getForm(i)
      if f.ClassName=='TfrmAutoInject' then
        if f.ScriptMode=='smLua' then
          LuaScriptForm=f
        end
      end
    end
  end

  if LuaScriptForm then
    local script=LuaScriptForm.assemblescreen.Lines.Text
    local newscript='decodeFunction("'..encodeFunction(loadstring(script))..'")()'
    LuaScriptForm.assemblescreen.Lines.Text=newscript
  else
    print("Nope")
  end
else
  showMessage("Then first make one as your script will be unreadable after this")
end


(And perhaps your own version of lua where you randomize the opcode values)

_________________
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
eigocc
Newbie cheater
Reputation: 0

Joined: 22 Dec 2018
Posts: 15

PostPosted: Fri May 17, 2019 1:06 am    Post subject: Reply with quote

I won't use this code. Can you explain it more clearly? Thank you!


Screenshot_20190517-114159.png
 Description:
 Filesize:  58.27 KB
 Viewed:  1710 Time(s)

Screenshot_20190517-114159.png



QQ截图20190517140724.png
 Description:
 Filesize:  268.95 KB
 Viewed:  1710 Time(s)

QQ截图20190517140724.png


Back to top
View user's profile Send private message Send e-mail
Dark Byte
Site Admin
Reputation: 457

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

PostPosted: Fri May 17, 2019 1:18 am    Post subject: Reply with quote

EncodeFunction(loadstring()) encodes the text into lua bytecode and converts that to text

DecodeFunction takes that text and converts it back to bytecode in the form of a function.
the () at the end will execute the function it returns.

But what was the script currently inside the luascript of the table ?

And don't run the code I posted in there, but run it inside a lua engine window instead

and try this code:
Code:

local r=messageDialog('Have you made a backup of your script?',mtWarning,mbYes,mbNo)
if r==mrYes then
  if LuaScriptForm==nil then
    for i=1,getFormCount()-1 do
      local f=getForm(i)
      if f.ClassName=='TfrmAutoInject' then
        if f.ScriptMode=='smLua' then
          LuaScriptForm=f
        end
      end
    end
  end

  if LuaScriptForm then
    local script=LuaScriptForm.assemblescreen.Lines.Text
    local newscript=[[
r=decodeFunction("]]..encodeFunction(loadstring(script))..[[")
if type(r)=='function' then
  r()
else
  print(type(r))
  if type(r)=='string' then
    print("decodeFunction returned a string:"..r)
  end
end
]]

    LuaScriptForm.assemblescreen.Lines.Text=newscript
  else
    print("Nope")
  end
else
  showMessage("Then first make one as your script will be unreadable after this")
end

_________________
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


Last edited by Dark Byte on Fri May 17, 2019 1:30 am; edited 1 time in total
Back to top
View user's profile Send private message MSN Messenger
eigocc
Newbie cheater
Reputation: 0

Joined: 22 Dec 2018
Posts: 15

PostPosted: Fri May 17, 2019 1:29 am    Post subject: Reply with quote

Thank you very much, Dark Byte. I have already figured it out, thank you for your answer! Laughing Laughing Laughing
Back to top
View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic   Reply to topic    Cheat Engine Forum Index -> Cheat Engine All times are GMT - 6 Hours
Page 1 of 1

 
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