indirivacua Posted January 27, 2019 Share Posted January 27, 2019 (edited) Many people been asking this (not really), so I made this tutorial of """how to encrypt/lock your cleo mods""", so nobody will can decompile it and read your super powerfull incredible piece of code! (We going to call it SPIPOC since now). This is a military grade encryption algorithm called XOR Crypt, and THE ONLY WAY to lock mods, nobody will can decrypt them, even if they read this topic will be impossible, you're safe First, compile your SPIPOC in SB with 'Add extra info to SCM' flag unchecked. For example, I made this SPIPOC: {$CLEO} {$NOSOURCE} // wait, waht? 0AD1: show_formatted_text_highpriority "This is %.4X opcode" time 2000 0x0AD1 0A93: end_custom_thread Then with some hex editor open your compiled .cs file and copy all the content of the file: D1 0A 0E 13 54 68 69 73 20 69 73 20 25 2E 34 58 20 6F 70 63 6F 64 65 05 D0 07 05 D1 0A 00 93 0A Then use this algorithm to get your code F U L L Y encrypted: #include <stdio.h> #include <stdlib.h> #include <stdint.h> #define XORKEY 7 // This is your encryption key int main() { uint8_t arr[] = {0xD1, 0x0A, 0x0E, 0x13, 0x54, 0x68, 0x69, 0x73, 0x20, 0x69, 0x73, 0x20, 0x25, 0x2E, 0x34, 0x58, 0x20, 0x6F, 0x70, 0x63, 0x6F, 0x64, 0x65, 0x05, 0xD0, 0x07, 0x05, 0xD1, 0x0A, 0x00, 0x93, 0x0A}; // Here should be the bytes of your code int length = sizeof(arr)/sizeof(uint8_t); printf("Lenght: %d\n", length); printf("Encrypted: \n"); for (int i = 0; i < length; i++) { arr[i] = arr[i] ^ XORKEY; printf("%02X ",arr[i]); } return 0; } /* Output: Lenght: 32 Encrypted: D6 0D 09 14 53 6F 6E 74 27 6E 74 27 22 29 33 5F 27 68 77 64 68 63 62 02 D7 00 02 D6 0D 07 94 0D */ Then copy the thing of the thing you got from the thing above and paste it into the hex dump: {$CLEO} {$NOSOURCE} // Again? :( const key = 2@ end key = 7 // Your key, big boy 0AC6: 0@ = label @label offset for 3@ = 0x00 to 0x1F // 32-1 = 31, yei, we know maths, btw, 1F=31, and yeah, you can use decimal system, but c'mon, hex makes you look cool, right? right??? 0A8D: 1@ = read_memory 0@ size 1 virtual_protect 0 0B12: 1@ = 1@ XOR key 0A8C: write_memory 0@ size 1 value 1@ virtual_protect 0 0@++ end :label hex //HEEEEEERE D6 0D 09 14 53 6F 6E 74 27 6E 74 27 22 29 33 5F 27 68 77 64 68 63 62 02 D7 00 02 D6 0D 07 94 0D end DONE, now you're a professional... hacker? whatever . FAQ: Are you being serious? Nope psst, read this boi Everything has an history, right? I was sorting my bookmarks and one of them was a thread on this forum of "how to lock a cleo". I'm almost sure that I added it in 2015/2016, I was a non-open-source guy at that time, shame me. Three years ago I started university and most important, I started to learn why is better 'open sourcing'. So that's why I made this useful-unuseful funny tutorial Andddd, in case you still don't get it, you can decrypt the script 'encrypted' by this method as the same way you encrypted it. With SB decompile it, copy all the content from the thread memory (hex...end) and paste into the array from the C code, you'll get the decrypted hex values, put them into a simply code like this one: {$CLEO} hex //Here end And compile it without the 'Add extra info to SCM' flag checked. Voilà. Btw, you need to understand you're not 'locking' anything, you're just confusing the decompiler. Maybe I'll update this topic with other ways to 'lock' (and unlock it, obviously) scripts in the future. Edited January 30, 2019 by indirivacua Huge grammatical errors. And some info about unlocking it. Shagg_E and Sanmodder 2 Link to comment Share on other sites More sharing options...
Pandaaming Posted April 4 Share Posted April 4 Bro how can I decrypt any Cleo script that is locked Link to comment Share on other sites More sharing options...
Jokerman1478 Posted May 28 Share Posted May 28 Arigato Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now