Can I edit beam file?

I’m a little shocked when I found that grep is able to find out string in beam files.

But there seems no tool to view it.

1 Like

In C or C++ you can probably find names of function calls, variables or raw literals as well.

And of course there are tools to view into the compiled modules, but I can’t remember them exactly.

1 Like

What do you want to view exactly? There’s various tools to manipulate and decompile beam files. Erlang comes with beam_lib just for that.

1 Like

Actually I don’t want view anything, just want to make sure no one could modify the compiled codes.

1 Like

Compiled code can always be reverse engineered with some effort, same as in Java, C++, etc. You can remove or encrypt the debug info to make it harder though. I think Mix supports --no-debug-info. There’s more details in the beam_lib page I linked above.

2 Likes