Jump to content

Welcome to Gaming On Steroids Forums
Register now to gain access to all of our features. Once registered and logged in, you will be able to create topics, post replies to existing threads, give reputation to your fellow members, get your own private messenger, post status updates, manage your profile and so much more. This message will be removed once you have signed in.
Login to Account Create an Account
Photo

[How To] Encryption on GoS scripts


  • Please log in to reply
15 replies to this topic

#1
Cloud

Cloud

    KAPPA

  • Ex-Staff
  • PipPipPip
  • 1,498 posts

Intro:

Why are you making this Cloud?

Because ilovesona requested it.

 

Can we use this regardless of Inspired or Feretorix permission?

You can, but your thread will be deleted in seconds.

 

What will this cover?

LuaC encryption + Base64

Base64

 

Tutorial:

Im assuming you know how to operate Notepad++ in this whole tutorial

1. LuaC + Base64

  • Open a command prompt and make sure you have Lua installed
  • cd (goto) the directory in which you keep your source.lua (what you want to encrypt)
  • Type in
    luac source.lua
  • This will generate a luac.out file in the directory which your Source.lua is
  • rename luac.out to Complied.lua or something
  • Then open the lua file with Notepad++
  • Goto Plugins > MIME Tools > Base64Encode (make sure you Cntrl A everthing in the Compiled.lua)
  • Now copy the the base64 code into this
  • Spoiler
  • Where it says "INSERT THE BASE64 STUFF HERE" put your Base64Encoded stuff.

2. Base64

  • Do all the steps above except anything related to the LuaC

  • 2

#2
ilovesona

ilovesona

    Sona's wife

  • Contributor
  • 1,096 posts

so CloudDecode is just a base64 decoder right?

 

and there is no "encryption" in this example, since luac is compile no encrypt

 

correct me if i'm wrong

 

 

anyways, thx for this tutorial, hope we have part2  Kappa


  • 0

#3
Inferno

Inferno

    Advanced Member

  • Contributor
  • 217 posts
1) You can localize functions 'from binary' and 'to binary'
2) You can create new function 'LoadEncryptedScript', winch looks like:
function LoadEncryptedScript(Code)
  assert(loadstring(CloudDecode("Code"), nil, "bt", _ENV))()
end
It also will allow to localize CloudDecode.
3) You can localize tonumber, or write this function manually (to reduce number of requires).
4) This is a more library :)

Anyway, thanks :)
  • 0

#4
TaydeR

TaydeR

    Advanced Member

  • Donator
  • 241 posts
May I ask a question Cloud SenpaÏ ?
If Feretorix or Inspired wil be against or even delete these threads why not sending it by MP ?
I mean, if people can't use it why not just providing the steps by MP ?


TaydeR
  • 0

#5
Cloud

Cloud

    KAPPA

  • Ex-Staff
  • PipPipPip
  • 1,498 posts

so CloudDecode is just a base64 decoder right?

 

and there is no "encryption" in this example, since luac is compile no encrypt

 

correct me if i'm wrong

 

 

anyways, thx for this tutorial, hope we have part2  Kappa

Yes base64decode (just renamed)

 

1) You can localize functions 'from binary' and 'to binary'
2) You can create new function 'LoadEncryptedScript', winch looks like:

function LoadEncryptedScript(Code)
  assert(loadstring(CloudDecode("Code"), nil, "bt", _ENV))()
end
It also will allow to localize CloudDecode.
3) You can localize tonumber, or write this function manually (to reduce number of requires).
4) This is a more library :)

Anyway, thanks :)

 

Thanks for the optimization. I'll test this out and release it.

 

May I ask a question Cloud SenpaÏ ?
If Feretorix or Inspired wil be against or even delete these threads why not sending it by MP ?
I mean, if people can't use it why not just providing the steps by MP ?


TaydeR

Well if you ask permission and they agree then you may use this encryption, but that said I would rather keep everything open source.


  • 0

#6
Feretorix

Feretorix

    Administrator

  • Administrators
  • 3,030 posts
I am pretty much against script encryption right now. Since from the start it can be decrypted and breaks the purpose from encrypting in the first place.

If somebody reports that a script is stolen (credits not given) and it can be proven, then a moderator can simply delete the script (thread) itself.

I want things to stay open source, i am pretty sure we learn from each other, but giving credits is a must.
  • 0

#7
Kiara789

Kiara789

    Advanced Member

  • Contributor
  • 193 posts
  • LocationChile

xD


  • 0

#8
Rakli

Rakli

    Advanced Member

  • Members
  • 213 posts

Cool, tried and it's working :P how can i reverse it back to normal?


  • 0

#9
Tiritto

Tiritto

    Script Developer

  • Members
  • 377 posts
  • LocationPoland

What's the actual point in encrypting LUA files?

How does it impact on the script performance?


  • 0

#10
Rakli

Rakli

    Advanced Member

  • Members
  • 213 posts

What's the actual point in encrypting LUA files?

How does it impact on the script performance?

I think it's not changing performance, just hiding the code..


  • 0

#11
Tiritto

Tiritto

    Script Developer

  • Members
  • 377 posts
  • LocationPoland

I think it's not changing performance, just hiding the code..

Yet you have to decrypt the code before sending it to GoS application.

So you have to execute extra operation on script load and your decrypted code is still available on the client-side.


  • 0

#12
Cloud

Cloud

    KAPPA

  • Ex-Staff
  • PipPipPip
  • 1,498 posts

I am pretty much against script encryption right now. Since from the start it can be decrypted and breaks the purpose from encrypting in the first place.

If somebody reports that a script is stolen (credits not given) and it can be proven, then a moderator can simply delete the script (thread) itself.

I want things to stay open source, i am pretty sure we learn from each other, but giving credits is a must.

Same thing i believe! But if for some reason permission is given then this is the guide people may turn to. I created this just for the fun of it and never intended to have any script encrypted.


  • 0

#13
Tiritto

Tiritto

    Script Developer

  • Members
  • 377 posts
  • LocationPoland

Same thing i believe! But if for some reason permission is given then this is the guide people may turn to. I created this just for the fun of it and never intended to have any script encrypted.

Imagine the chaos when Inspired will encrypt his library.


  • 0

#14
ilovesona

ilovesona

    Sona's wife

  • Contributor
  • 1,096 posts

Cool, tried and it's working :P how can i reverse it back to normal?

dump the decoded string and use unlua to decompile back to source code


  • 0

#15
testerhdre

testerhdre

    Member

  • Members
  • 18 posts

@ilovesona

 

dump the decoded string and use unlua to decompile back to source code

 

 can you explain more ?

i didnt understand 


  • 0

#16
Krystra

Krystra

    Sexy Developer

  • Contributor
  • 417 posts

@ilovesona

 can you explain more ?

i didnt understand 

First of all @ilovesona is mia like months, secondly you are not allowed to release an encrypted script anyways so do not spend your time to these kind of things atm


  • 0




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users