Golang:保护源代码

huangapple go评论95阅读模式
英文:

Golang: protect source code

问题

目前来说,搜索Go/Golang是一件困难的事情,我在这里也没有找到我要找的内容。我知道在编译应用程序时,可以在几种语言中进行一定程度的加密。有人能给我快速介绍一下将Go源代码编译为exe后的安全性吗?如果源代码可以被读取,至少部分可以,是否有任何方法可以增加源代码的安全性?

英文:

Go/Golang in general at the moment is a hard thing to search for, nor did I find what I was looking for here. I know there some level of encryption that can be done during compilation of an app in several languages. Can anyone give me a quick rundown of the security of Go source code after being compile to an exe? If it can be read, at least in part, is there anything out there to increase security of the source code?

答案1

得分: 10

只分发二进制文件(按平台/架构)。这是任何语言都能做到的最好的方式。没有办法在分发程序时确保防止逆向工程。任何告诉你不同的人可能只是试图向你销售一种“保护”方案。实际上并不存在这样的东西。

另一方面,你潜在用户中99.9%的人可能不知道如何进行逆向工程。

另一方面,只要你潜在用户中的0.01%具备逆向工程的能力,你就会陷入困境。

换句话说,尽量找到一个不依赖于安全性的商业模式。实际上,即使是开源代码也可以产生利润——如果其价值不仅仅在于能够访问源代码本身。

英文:

Distribute only the binary (per platform/architecture). That's the best you can get with any language. There's no way how to distribute a program while being safe of reverse engineering it. Anyone telling you something different is probably just trying to sell you a "protection" scheme. No such thing really exists.

On the other hand: 99.9% of your potential users probably have no idea how to reverse engineer your program.

On the yet another hand: It's enough if 0.01 of your potential users have the ability to reverse engineer your program and you're doomed.

IOW, try to find out a business model which relies on anything else but security by obscurity. Actually, even open source code can generate profit - if the value of it is not only in having access to the source code per se.

huangapple
  • 本文由 发表于 2013年7月31日 05:31:55
  • 转载请务必保留本文链接:https://go.coder-hub.com/17957808.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定