Forex Factory (https://www.forexfactory.com/forum.php)
-   Platform Tech (https://www.forexfactory.com/forumdisplay.php?f=69)
-   -   Unlocking EA source code (https://www.forexfactory.com/showthread.php?t=101079)

stopman Aug 17, 2008 6:14pm | Post# 1

Unlocking EA source code
 
Hi, there coders!
I have a question - how can I unlock EA and get to it's source code?
Because it shows like grey in "Expert advisors" section and when i click modify on the EA it doesn't open in MetaEditor.
It's an EX4 File, if I can't open it in MetaEditor, what programm should help me?

Thanks.

Ronald Raygun Aug 17, 2008 6:17pm | Post# 2

Look for a decompiler.

There's nothing else you can do.

tenantro Aug 17, 2008 6:40pm | Post# 3

Look for a decompiler.

There's nothing else you can do.
Given that your title says you're a programmer, you should know better than to recommend people to decompile software, which is most likely against the EULA of many.

fxxx Aug 17, 2008 7:29pm | Post# 4

Given that your title says you're a programmer, you should know better than to recommend people to decompile software, which is most likely against the EULA of many.
...Given that your title says ... : 1. you don't know that; 2. most likely - not.

Ronald Raygun Aug 17, 2008 7:41pm | Post# 5

Given that your title says you're a programmer, you should know better than to recommend people to decompile software, which is most likely against the EULA of many.
I am a trader that knows programming. I am not a programmer trying to be a trader. Get the title right.

A lot of commercial EA/Indicator vendors do not include an EULA in the purchasing terms of their software. It's a shame really, but that's the truth.

Further, I have yet to recommend any specific decompiler. I know of several, and I can tell you that quality of decompiling varies greatly.

mtaboneweb Aug 19, 2008 3:47pm | Post# 6

Hi, there coders!
I have a question - how can I unlock EA and get to it's source code?
Because it shows like grey in "Expert advisors" section and when i click modify on the EA it doesn't open in MetaEditor.
It's an EX4 File, if I can't open it in MetaEditor, what programm should help me?

Thanks.

People like you are the reason I no longer publish my EAs on these forums anymore. People who write these EAs like myself spend a great deal of time doing it. If we choose to supply you with an ex4 file then there is no need for you to have to do anything other than attach the EA to a chart and use it. You don't have to have the source code and if it wasn't supplied to you then you should have no right to decompile the Ea and get it. Of course you can if you look hard enough but it's specifically for this reason that no one here on these threads will see me post an EA here again. As long as people choose to decompile there will be less and less programmers who will publish their EAs for free at all. Then you'll all be forced to learn to program them for yourselves. At that point, maybe you'll appreciate how much work goes into one and if you spent your time doing it you may not be so happy to see others asking how to rape your work.

stopman Aug 20, 2008 6:33am | Post# 7

Won't be trying that again. You convinced me.

smjones Aug 21, 2008 6:37pm | Post# 8

I have been thinking about this problem with decompilers and security. So, I decided to start a project. My question was just how secure is MT4 and a EX4 file and also, is a decompiler even necessary?

I took a Hex Editor and a Debugger. ( I will not say which ones, because there are not many debuggers that can attach an EX4 and I do not want to help the cheats.) Any way, I mapped a EX4 (I created with source code, to compare).

Well without giving anything away, I can say with 100% confidence, that EX4 is not secure at all and MT4 is weak also. I was able to reconstruct the EX4 back into a MQ4 with the same functionality, only the variable names had to be recreated, because they are stored dynamically at mem locations.

The point being, is that Your EX4s are not safe at all.

The thing is, I am at best only an average programmer. So if I can do it, those with real skill it would be no problem.

Bottom line, I won't be posting any thing I would want to keep control over.

Edit : No I will not violate Copyrights and show how or do it for others. Please don't ask. thanks

smjones Aug 21, 2008 7:14pm | Post# 9

I have been thinking about this problem with decompilers and security. So, I decided to start a project. My question was just how secure is MT4 and a EX4 file and also, is a decompiler even necessary?

I took a Hex Editor and a Debugger. ( I will not say which ones, because there are not many debuggers that can attach an EX4 and I do not want to help the cheats.) Any way, I mapped a EX4 (I created with source code, to compare).

Well without giving anything away, I can say with 100% confidence, that EX4 is not secure at all and MT4 is weak also. I was able to reconstruct the EX4 back into a MQ4 with the same functionality, only the variable names had to be recreated, because they are stored dynamically at mem locations.

The point being, is that Your EX4s are not safe at all.

The thing is, I am at best only an average programmer. So if I can do it, those with real skill it would be no problem.

Bottom line, I won't be posting any thing I would want to keep control over.

Edit : No I will not violate Copyrights and show how or do it for others. Please don't ask. thanks

I wanted to put this in the how to protect your code thread, but it is closed, so I will put it here.

As I think about it, the best way I can think of to prevent cheats is to create a dll call that requests the computer ID that the EX4 is going to run on. The ID is sent to your server via request before you give out the EX4 and then your server pings the computer that the EX4 is on to Verify that it is correct. Of course this is not practical for a non commercial EX4, so just be aware when you write something and distribute the EX4 that it is not difficult to convert it.


EDIT:

Now that I have thought about it, I don't think even a DLL would be the answer. That could easily be removed from the converted code. I guess it is like the music industry. I cannot think a of single method that cannot be defeated. Man that is sad to think about, because there is a lot of effort that goes into writing a indicator or a EA.

Plutonite Aug 21, 2008 8:21pm | Post# 10

Guys, come on. Since when is closed source a viable option for security? I understand that most of you come from outside the computing industry/sciences, and that this being a commercial business type of dicussion, many people are going to be a little sensitive about their "copyrights" (the most misunderstood term in history, probably) but like smjones said, this is hopeless.

If any of you have been following the software industry since the 70's, these discussions have been exhausted again and again. Why are you so mad at the person who has your executable but wants to revert it to code? Do you not realize that you are providing him with instructions at some level, that were transformed into more machine-oriented instructions at a lower level? You are giving him code, no matter what type. Source code is just more readable by humans, that's all. Your "EX4" itself is readable by someone who knows the assembly language.

What are you trying to do?

If you want to keep your stuff secret, keep it secret. If you share digital information, you've shared it. You can't do both at the same time. End of story.

I'm sorry if this sounds blunt, I just don't understand closed source at all.

tdion Aug 21, 2008 8:49pm | Post# 11

it's a shame??

sorry but i disagree whole-heartedly. decompiling EX4 files is theft. and although i have thought of doing the same thing myself, i won't.

i hope every company that catches EULA violations of decompilation will prosecute to the fullest. there is a reason the code is hidden.

A lot of commercial EA/Indicator vendors do not include an EULA in the purchasing terms of their software. It's a shame really, but that's the truth.

tdion Aug 21, 2008 8:51pm | Post# 12

just another nugget here....

a decompiler WILL NEVER GIVE YOU THE EXACT SOURCE CODE. that's not how it works. the logic might come out, but statements will be in different orders.... comments will be left out.... etc.

this is because the MT4 compiler strips most of this information when it creates the binary.

tdion Aug 21, 2008 8:53pm | Post# 13

**high five**

right there with you, brother. no more freeloaders getting a free ride on MY hard work. it makes no sense, is illogical, and plain doesn't work.

People like you are the reason I no longer publish my EAs on these forums anymore.

fxxx Aug 21, 2008 9:35pm | Post# 14

same story as in music, movie industry
.ex helps, but don't prevent abuse; either/or - don't put on public

Plutonite Aug 22, 2008 2:54am | Post# 15

decompiling EX4 files is theft.

Maybe I'm not seeing something. What exactly is being stolen? If someone gives you an executable with their explicit consent, why is performing any action on that executable considered theft? Remember that we are not talking about derivative work or distribution - just the act of executing an algorithm on the file that the dude gave you for free (or for money, even). Why is that theft?

Disclaimer: I have written hundreds of EA's while learning to deal with Meta Trader, and do not plan on giving any away to the public.

tdion Aug 22, 2008 3:05am | Post# 16

okay okay okay....

TECHNICALLY it isn't theft.

but the premise is there. if the source code was intended for you, the MQ4 file would have been shared. and if the author chooses to only give the EX4, he obviously wants his intellectual property protected.

you can argue the whys and the wherefores, but at the end of the day if an MQ4 file isn't given, it wasn't intended for you to see.

Maybe I'm not seeing something. What exactly is being stolen?
btw, haven't seen you around in awhile pluto... still trading?

Plutonite Aug 22, 2008 3:28am | Post# 17

Yep still around, not as much time to trade/experiment as before, but I come in to start the odd flamewar now and then

Glad to see you're still around too!

okay okay okay....

TECHNICALLY it isn't theft.

but the premise is there. if the source code was intended for you, the MQ4 file would have been shared. and if the author chooses to only give the EX4, he obviously wants his intellectual property protected.

you can argue the whys and the wherefores, but at the end of the day if an MQ4 file isn't given, it wasn't intended for you to see.



btw, haven't seen you around in awhile pluto... still trading?

mladen Aug 22, 2008 3:56am | Post# 18

...
 
2 Attachment(s)
If one does not want its work decompiled one should not post it
Anything posted is going to be abused, appropriated, renamed and sold... Counting on honesty and courtesy is simply naive

A coder is left another option too : do the pornography principle - post pictures only. Sure it makes a coder almost same as the scammers but, to hell, it feels so good.

PS: some porn (after all, it is Friday). Decompilable at a fly
Click to Enlarge

Name: porn.gif
Size: 22 KB
Click to Enlarge

Name: porn 2.gif
Size: 24 KB

Ronald Raygun Aug 22, 2008 7:48pm | Post# 19

it's a shame??

sorry but i disagree whole-heartedly. decompiling EX4 files is theft. and although i have thought of doing the same thing myself, i won't.

i hope every company that catches EULA violations of decompilation will prosecute to the fullest. there is a reason the code is hidden.
Apple is doing that right now against Psystar. A lot of legal experts are going back and forth to the damages that Apple is justly due. Frankly, if Apple loses, all EULAs could be subject to legal violation (if that's grammatically possible) based on this precedent.

fxxx Aug 22, 2008 10:00pm | Post# 20

If one does not want its work decompiled one should not post it
Anything posted is going to be abused, appropriated, renamed and sold... Counting on honesty and courtesy is simply naive
A coder is left another option too : do the pornography principle - post pictures only. Sure it makes a coder almost same as the scammers but, to hell, it feels so good.
PS: some porn (after all, it is Friday). Decompilable at a fly
not nice, Mladen, very not nice
no matter EULA , FIFA or NASA or T.G.I.F. regulations, copy and paste rights watewer - for doing things like that this pornohuker should be kild on the spot....


© Forex Factory