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 


encode and decode

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

Joined: 07 May 2020
Posts: 163
Location: On The Moon

PostPosted: Thu Jun 18, 2020 6:40 am    Post subject: encode and decode Reply with quote

Code:
local a = print('hi')
local b = encode(a)
decodeFunction(b)

what i am really trying to do is to decode an encode but i get it as print('hi') what i really get is hi printed but i want to get print('hi') is there anyway to do it??

_________________
I can see you Hitler
Especially When I am On the Moon!!
You are Right now in cheat engine forum Wink
Back to top
View user's profile Send private message
Dark Byte
Site Admin
Reputation: 458

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

PostPosted: Thu Jun 18, 2020 7:14 am    Post subject: Reply with quote

Code:

function x()
  print('hi')
end

encodeFunction(x)

or
Code:

encodeFunction(loadstring(print('hi')))


and use a custom lua build

_________________
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 Thu Jun 18, 2020 7:16 am; edited 1 time in total
Back to top
View user's profile Send private message MSN Messenger
blankTM
Cheater
Reputation: 0

Joined: 03 May 2020
Posts: 49

PostPosted: Thu Jun 18, 2020 7:15 am    Post subject: Re: encode and decode Reply with quote

encryption:

local str=[==[
print('hi')
]==]
local str1 = encodeFunctionEx(str)
print(str1)

--------------------------
decodeFunction(str1)()
--------------------------
or
--------------------------
local run = decodeFunction(str1)
run()
--------------------------
Back to top
View user's profile Send private message
Oxijen
Expert Cheater
Reputation: 0

Joined: 07 May 2020
Posts: 163
Location: On The Moon

PostPosted: Thu Jun 18, 2020 8:12 am    Post subject: Reply with quote

i am trying to decode and get the script not decode and run the script
_________________
I can see you Hitler
Especially When I am On the Moon!!
You are Right now in cheat engine forum Wink
Back to top
View user's profile Send private message
Dark Byte
Site Admin
Reputation: 458

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

PostPosted: Thu Jun 18, 2020 10:52 am    Post subject: Reply with quote

Not really. At most some bytecodes that can be disassembled back into some difficult to read code, and with a custom lua dll, not possible
_________________
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
Oxijen
Expert Cheater
Reputation: 0

Joined: 07 May 2020
Posts: 163
Location: On The Moon

PostPosted: Thu Jun 18, 2020 1:20 pm    Post subject: Reply with quote

so if I just use encodeFunction() to encode and use decodeFunction to run, no one will be able to have my script??
_________________
I can see you Hitler
Especially When I am On the Moon!!
You are Right now in cheat engine forum Wink
Back to top
View user's profile Send private message
atom0s
Moderator
Reputation: 198

Joined: 25 Jan 2006
Posts: 8517
Location: 127.0.0.1

PostPosted: Thu Jun 18, 2020 2:49 pm    Post subject: Reply with quote

DEMON_BOUNTY wrote:
so if I just use encodeFunction() to encode and use decodeFunction to run, no one will be able to have my script??


It can still be rebuilt back from the compiled byte code. But is a lot more work than just dumping a string which will deter most skids trying to copy/paste things.

_________________
- Retired.
Back to top
View user's profile Send private message Visit poster's website
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