 |
Cheat Engine The Official Site of Cheat Engine
|
| View previous topic :: View next topic |
| Author |
Message |
door02 Newbie cheater
Reputation: 0
Joined: 28 Aug 2020 Posts: 20
|
Posted: Fri Sep 11, 2020 3:03 am Post subject: Please reply :'( |
|
|
I Need Bas64 code on lua please send me
Base64 encryption ty
|
|
| Back to top |
|
 |
AylinCE Grandmaster Cheater Supreme
Reputation: 37
Joined: 16 Feb 2017 Posts: 1543
|
Posted: Fri Sep 11, 2020 4:38 am Post subject: |
|
|
| Corroder wrote: | Like this :
| Code: | ---- function encode / decode #1 = base64
local b='ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'
function bec(data)
return ((data:gsub('.', function(x)
local r,b='',x:byte()
for i=8,1,-1 do r=r..(b%2^i-b%2^(i-1)>0 and '1' or '0') end
return r;
end)..'0000'):gsub('%d%d%d?%d?%d?%d?', function(x)
if (#x < 6) then return '' end
local c=0
for i=1,6 do c=c+(x:sub(i,i)=='1' and 2^(6-i) or 0) end
return b:sub(c+1,c+1)
end)..({ '', '==', '=' })[#data%3+1])
end
function bdc(data)
data = string.gsub(data, '[^'..b..'=]', '')
return (data:gsub('.', function(x)
if (x == '=') then return '' end
local r,f='',(b:find(x)-1)
for i=6,1,-1 do r=r..(f%2^i-f%2^(i-1)>0 and '1' or '0') end
return r;
end):gsub('%d%d%d?%d?%d?%d?%d?%d?', function(x)
if (#x ~= 8) then return '' end
local c=0
for i=1,8 do c=c+( x:sub(i,i)=='1' and 2^(8-i) or 0) end
return string.char(c)
end))
end
---- function encode / decode #2 = rotate13
function rotate13(t)
local byte_a, byte_A = string.byte('a'), string.byte('A')
return (string.gsub(t, "[%a]",
function (char)
local offset = (char < 'a') and byte_A or byte_a
local b = string.byte(char) - offset -- 0 to 25
b = math.fmod(b + 13, 26) + offset -- Rotate
return string.char(b)
end
))
end
---- Test the logic
text = "Mr.Rabbit want to know the trick because he has tricked"
encode = rotate13(bec(rotate13(bec(text))))
print(encode)
---- result : E0gJnRu6H3MZraxjIyIkqJ9uEUEkIQu0owV1nKSfGmOhIRu0pIIKL0jlMaEZrxy3GRgWoH1TG2WAEx9vGRgnqUSII2AZZzq5GH49CD==
--- Now what you try is
text_back = bdc(encode)
print(text_back) --- will give you alien code
---- result : H ??s?c#"$?nA$!?u?c?!?/H?1????}Se?o'?D?#`g:?~=
--- Try to get back orginal
decode = bdc(rotate13(bdc(rotate13(encode))))
print(decode)
--- result : Mr.Rabbit want to know the trick because he has tricked
|
That is their logic to encode decode their code. But they use another decode encode function other else base64, and #2 enco deco function is there at 1st script you posted as topic. |
----------------------------------------
Why was the code and decoder example given;
Code: to see the base64 logic.
Codec: If you are going to do this coding for an "Aobs" or "Trainer Script";
It was given for you to know it's solved and make it more complicated.
The decision is yours.
_________________
Last edited by AylinCE on Fri Sep 11, 2020 5:00 am; edited 1 time in total |
|
| Back to top |
|
 |
door02 Newbie cheater
Reputation: 0
Joined: 28 Aug 2020 Posts: 20
|
Posted: Fri Sep 11, 2020 4:52 am Post subject: how |
|
|
| how to encrypt loadstring bytecode with it?
|
|
| Back to top |
|
 |
n1vX Advanced Cheater
Reputation: 0
Joined: 27 May 2007 Posts: 61
|
|
| Back to top |
|
 |
Corroder Grandmaster Cheater Supreme
Reputation: 75
Joined: 10 Apr 2015 Posts: 1668
|
Posted: Fri Sep 11, 2020 6:48 am Post subject: |
|
|
What is Base64 encryption?. Please tell
And if you plan not share your source code or you are very paranoid someone will get your source code or steal your code then the best encryption method is : DON'T SHARE EVERYTHING you have.
_________________
Stealing Code From Stolen Code...
And Admit It.. Hmmm....Typically LOL |
|
| Back to top |
|
 |
AylinCE Grandmaster Cheater Supreme
Reputation: 37
Joined: 16 Feb 2017 Posts: 1543
|
Posted: Fri Sep 11, 2020 7:09 am Post subject: |
|
|
| Corroder wrote: | What is Base64 encryption?. Please tell
And if you plan not share your source code or you are very paranoid someone will get your source code or steal your code then the best encryption method is : DON'T SHARE EVERYTHING you have. |
I agree with what @corroder said.
It'll be a little weird because (Publish the code with the decoder!)
Here is the coding example you wanted.
| Code: | if f then f.destroy() end
f=createForm()
f.Position=poDesktopCenter f.Width=525 f.Height=240
local m1=createMemo(f)
m1.Width=240 m1.Height=170 m1.Left=15 m1.Top=15 m1.WordWrap=false m1.ScrollBars="ssAutoBoth"
m1.Lines.Text="print('Hello Admin')"
local m2=createMemo(f)
m2.Width=240 m2.Height=170 m2.Left=270 m2.Top=15 m2.WordWrap=false m2.ScrollBars="ssAutoBoth"
local b1=createButton(f)
b1.Left=142 b1.Top=200 b1.caption="LuaLoad"
local b2=createButton(f)
b2.Left=225 b2.Top=200 b2.caption="BecCode"
local b3=createButton(f)
b3.Left=307 b3.Top=200 b3.caption="Reset"
---------------------------------------------
local b='ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'
function bec(data)
return ((data:gsub('.', function(x)
local r,b='',x:byte()
for i=8,1,-1 do r=r..(b%2^i-b%2^(i-1)>0 and '1' or '0') end
return r;
end)..'0000'):gsub('%d%d%d?%d?%d?%d?', function(x)
if (#x < 6) then return '' end
local c=0
for i=1,6 do c=c+(x:sub(i,i)=='1' and 2^(6-i) or 0) end
return b:sub(c+1,c+1)
end)..({ '', '==', '=' })[#data%3+1])
end
function bdc(data)
data = string.gsub(data, '[^'..b..'=]', '')
return (data:gsub('.', function(x)
if (x == '=') then return '' end
local r,f='',(b:find(x)-1)
for i=6,1,-1 do r=r..(f%2^i-f%2^(i-1)>0 and '1' or '0') end
return r;
end):gsub('%d%d%d?%d?%d?%d?%d?%d?', function(x)
if (#x ~= 8) then return '' end
local c=0
for i=1,8 do c=c+( x:sub(i,i)=='1' and 2^(8-i) or 0) end
return string.char(c)
end))
end
local bdc1=([[
local b='ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'
function bdc(data)
data = string.gsub(data, '[^'..b..'=]', '')
return (data:gsub('.', function(x)
if (x == '=') then return '' end
local r,f='',(b:find(x)-1)
for i=6,1,-1 do r=r..(f%2^i-f%2^(i-1)>0 and '1' or '0') end
return r;
end):gsub('%d%d%d?%d?%d?%d?%d?%d?', function(x)
if (#x ~= 8) then return '' end
local c=0
for i=1,8 do c=c+( x:sub(i,i)=='1' and 2^(8-i) or 0) end
return string.char(c)
end))
end]])
--[[
--UDF1 mode = LuaLoad
function CEButton1Click(sender)
text_encode=bec(UDF1.CEMemo1.Lines.Text)
print(text_encode)
--script_encode = text_encode --load(text_encode)()
script_print = ("--bdc code\n"..bdc1.."\n\nlocal my_function = bec(\'"..text_encode.."\')\nload(my_function)()")
UDF1.CEMemo2.Lines.Text = script_print
end
function CEButton2Click(sender) --Reset
UDF1.CEMemo1.Lines.Text = ''
UDF1.CEMemo2.Lines.Text = ''
end
UDF1.show()
]]
--LuaLoad
b1.OnClick=function()
text_encode=bec(m1.Lines.Text)
script_print = ("--bdc code\n"..bdc1.."\n\nlocal my_function = bdc(\'"..text_encode.."\')\nload(my_function)()")
m2.Lines.Text = script_print
end
--bdc Code
b2.OnClick=function()
text_encode=bec(m1.Lines.Text)
--script_print = ("bdc(\'"..text_encode.."\')")
m2.Lines.Text = text_encode
end
b3.OnClick=function() --Reset
m1.Lines.Text = ''
m2.Lines.Text = ''
end |
EncodeFunction for 32/64 bit; @ mgr.inz.Player example.
https://forum.cheatengine.org/viewtopic.php?t=609124
Remember: These are just ideas to get started.
To create better encryption codes are examples.
_________________
|
|
| Back to top |
|
 |
|
|
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
|
|