ionCube Logo
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


 
Post new topic   Reply to topic    ionCube Forum Index -> ionCube PHP Encoder

How to overwrite the source code?

Author Message
Jesper



Joined: 27 Sep 2018
Posts: 1

PostPosted: Thu Sep 27, 2018 4:45 am    Post subject: How to overwrite the source code? Reply with quote

In our build env we have a copy of our source code place in folder
Code:
/workspace/src/class
.
Now I want to use IonCube encoder for encode every file in the folder and then overwrite the file again. (It is OK to overwrite this file since this is a copy of the origon source files)

I have tray with follow command line (on linux) without success.

Code:
ioncube_encoder71_10.2_64 -v --optimize max --without-loader-check --allow-encoding-into-source  /workspace/src/class --replace-target -o /workspace/src/class

The result I get is:
Code:
Error: The source and output directories are the same


Please advice how I can resolve this issue.
Back to top
View user's profile Send private message
alastair



Joined: 23 Feb 2010
Posts: 370

PostPosted: Thu Sep 27, 2018 10:10 am    Post subject: Reply with quote

Hi,

You cannot do that using just the ionCube Encoder, which does not allow you to overwrite the source files.

You can create a sub-directory within the source tree that will contain the encoded files and write into that using the allow-encoding-into source and ignore options:

ioncube_encoder71_10.2_64 -v --optimize max --without-loader-check --allow-encoding-into-source /workspace/src/class --ignore /workspace/src/class/encoded --replace-target -o /workspace/src/class/encoded

If you really want to replace the source with the encoded target then you can easily code that within a shell script using "rm -fr <source> directory" (to remove the source copy after encoding) and "mv <target> <source>" (to rename the encoded target as the source). Obviously the target directory cannot be within the source tree if using that approach.

We would urge caution when doing so. Despite the Encoder not allowing you to overwrite source files, we regularly get support requests from customers asking if it is possible to decode their encoded files as they have lost the original source. Sometimes they did have backups and version control but those too had failed.
_________________
Alastair

ionCube
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    ionCube Forum Index -> ionCube PHP Encoder All times are GMT + 1 Hour
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum