I need an ex4 protection system and its source code written in C#.
I have an mt4 expert advisor program and a dll and i am planning to sell them.
But as you know ex4 files can be decompiled to mq4.
So a program should be developed to encrypt my ex4 file (encryptor).
This program will use AES algorithm for encrypting.
The encryptor will generate 128 bit key and encrypt the ex4 file accourding to that key and inject the key into the encrypted ex4 file. The encryptor will not inject the key to the beginning or end of the encrypted ex4. Instead somewhere in the file.
Encrypted files can not be run by Metatrader 4.
So we need a second program named decryptor.
The decryptor program will run on my customer’s computer and it will decrypt the encrypted ex4 file and give the decripted ex4 to Metatrader.
The decrypted ex4 file will not put into file system in any way and any time.
Because if the decrypted file exists in file system without decryption, somebody can got it.
The encrypted ex4 code will be decrypted and delivered to Metatrader by decryptor, only when Metatrader attempts to load encrypted ex4 file from /experts folder of Metatrader.
I mean that the decryption process will run inside decryptor and decrypted code will be deliver directly to Metatrader. So the user or hacker will not be able to reach to the decrypted ex4 file in any way.
The encryptor and decryptor programs will be written in c# and deliver as seperated Visual Studio 2010 projects.
How will i use encryptor program:
When i want to produce a copy of my expert system for a customer, I will open Visual Studio 2010 and load encryptor Project. Then i will run it. The program will ask for ex4 file or files which will be encrypted. The encryptor program will produce the encrypted ex4 file and save it to the same folder which the original ex4 file resides.
How my customer will use my expert and decryptor program:
He will receive from me only a setup program([url removed, login to view]).
He will run the setup program and the program will ask for Metatrader folder.
The program will copy the encrypted ex4 files and dlls to proper folders of Metatrader.
Then the setup program will install the decryptor program.
(So you will deliver to me a Visual Studio setup Project for creating such an installer )
The setup program will run the decryptor program. The decryptor program will run when Windows starts up. It will be a service application. So the cutomer will not see it on taskbar of Windows and it will start running when system restarts.
The customer will not enter any key, licence code or password to install my system.
I will use acount number based protection in my dll. So my dll will be checking account number of Metatrader. If it is correct its functions will produce correct results and if it is not correct, dll will not produce correct results for ex4. I can develop my own dlls. I dont want you to develop anything for account number control. I mentioned this detail here for only informing you about what i am planning.
I want to know if you have any different method offer for protection of my ex4 files.