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 


En/decode a Form

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> Cheat Engine Lua Scripting
View previous topic :: View next topic  
Author Message
paul44
Expert Cheater
Reputation: 3

Joined: 20 Jul 2017
Posts: 211

PostPosted: Sat Jan 31, 2026 8:17 am    Post subject: En/decode a Form Reply with quote

En/decode a lua script does not seem to give problems, but i have been trying to do the same with a Form.
I basically save the form to disk (so not accessible via Table~edit), and (would) load it as file:
//... (as raw file, it can be loaded this way)
local sLua = 'My_Form.frm'
oLua = findTableFile(sLua).stream
My_GUI = createFormFromStream(oLua)
...//

Above works fine, but the form - on disk - should be in encoded format. And i can not get this work - load & decode - somehow ?!

Btw: main reason to use this: the gui references (link & images) to FRF forum; and i obviously like to make sure that it stays this way...
Back to top
View user's profile Send private message
AylinCE
Grandmaster Cheater Supreme
Reputation: 37

Joined: 16 Feb 2017
Posts: 1546

PostPosted: Mon Feb 02, 2026 9:06 am    Post subject: Reply with quote

Since you encrypted the form text (code), load the encrypted code into a txt file.

At runtime, decrypt the txt code, save it as a ".FRM" file somewhere on disk (like Temp), call it, run it, and delete the decrypted instance from disk.

_________________
Hi Hitler Different Trainer forms for you!
https://forum.cheatengine.org/viewtopic.php?t=619279
Enthusiastic people: Always one step ahead
Do not underestimate me Master: You were a beginner in the past
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
Csimbi
I post too much
Reputation: 98

Joined: 14 Jul 2007
Posts: 3353

PostPosted: Mon Feb 02, 2026 1:10 pm    Post subject: Reply with quote

AylinCE wrote:
Since you encrypted the form text (code), load the encrypted code into a txt file.

At runtime, decrypt the txt code, save it as a ".FRM" file somewhere on disk (like Temp), call it, run it, and delete the decrypted instance from disk.

I guess that defeats the point.
I assume if it need to be decrypted at all, it should be decrypted into memory.
Can't CE read encrypted data natively?
Back to top
View user's profile Send private message
AylinCE
Grandmaster Cheater Supreme
Reputation: 37

Joined: 16 Feb 2017
Posts: 1546

PostPosted: Tue Feb 03, 2026 12:19 am    Post subject: Reply with quote

If Cheat Engine doesn't have a built-in decoder for your specific encryption method, you must handle the decryption within your script logic.

However, I understand your concern about "defeating the point" by saving it to disk. If you want to avoid the disk entirely for security reasons, you should decrypt the data directly into a MemoryStream instead of a physical file.

Since createFormFromStream expects a stream object, the logic would be:

    Load the encrypted file into a local variable/buffer.

    Decrypt it in memory (using your custom function).

    Write the decrypted string/bytes into a createMemoryStream().

    Pass that memory stream to createFormFromStream(ms).


The logic remains the same: Whether it's in RAM or on Disk, the decrypted content must exist somewhere for the engine to parse it.

Also, consider this: Is your main script itself encrypted? If the main script is plain text, anyone can see your decryption function and easily reverse the process to get your FRM content anyway. To truly protect your links/images, the "loader" script itself needs to be protected/wrapped.

_________________
Hi Hitler Different Trainer forms for you!
https://forum.cheatengine.org/viewtopic.php?t=619279
Enthusiastic people: Always one step ahead
Do not underestimate me Master: You were a beginner in the past
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
Csimbi
I post too much
Reputation: 98

Joined: 14 Jul 2007
Posts: 3353

PostPosted: Tue Feb 03, 2026 1:04 pm    Post subject: Reply with quote

MemoryStream - check.
Makes sense, thanks!
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
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