Skip to content
This repository has been archived by the owner on Jan 13, 2024. It is now read-only.

Does pkg compiling prevent source code from being extractable? #69

Closed
sisou opened this issue May 5, 2017 · 3 comments
Closed

Does pkg compiling prevent source code from being extractable? #69

sisou opened this issue May 5, 2017 · 3 comments

Comments

@sisou
Copy link

sisou commented May 5, 2017

In the README you mention that scripts that are added as scripts in the config are compiled using the V8 compiler. Is that also true for regular dependencies that are found from the entry point?

And does this compilation prevent source code from being accessible in the package?

My use case here is, that I have a private key string in my source code, but when I ran strings on the resulting executable, the string was still there in plain text.

Thanks!

@igorklopov
Copy link
Contributor

igorklopov commented May 5, 2017

Imagine you create a simple C++ program, that outputs your key to stdout. If you compile it and look into executable, you will find your key inside it as well. The executable (created by pkg, or created by gcc) does not need to do anything with string literals (like your key) in order to use them at run time. String literals are stored as is. Application code is transformed to machine code. It's side effect is that source code (syntax) is not shipped. But what transformation do you expect for string literals (like your key) ?

@sisou
Copy link
Author

sisou commented May 5, 2017

OK, fair enough. Thanks! =)

@sisou sisou closed this as completed May 5, 2017
@igorklopov
Copy link
Contributor

:) You are welcome.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants