hide/encrypt script files

Hello,

We developed and tested a set of script in GMS files that we run in command line, like this
>> "C:\Program Files\GlobalMapper16_64bit\global_mapper.exe" "C:\folder\sub_folder\script.gms"

But in matter of confidentiality, we want to hide the code in script file some how, so what I'am asking is if there is some way to use the SDK to compile the scripts and still run it in the command line without no one could see what is in the scripts?
Or if you know another way to do it beyonde the SDK.

Tagged:

Answers

  • bmg_bobbmg_bob Global Mapper Programmer Posts: 2,007
    edited January 2016
    The SDK does has an API for running a script, so you could definitely write a program that will decrypt your script file and run it.  Then you could run your program from the command line, passing it your encrypted script file in the same manner as you are doing now.
  • hfphfp Posts: 2
    So, the script could be decrypted inside the SDK, but how can I decrypt and deliver it to Global Mapper without saving it in a temporary folder were everyone have access?

  • bmg_bobbmg_bob Global Mapper Programmer Posts: 2,007
    hfp said:
    So, the script could be decrypted inside the SDK, but how can I decrypt and deliver it to Global Mapper without saving it in a temporary folder were everyone have access?

    Your program would perform the following steps:
    1) Read the encrypted contents from your encrypted script file
    2) Decrypt the data to produce the script commands, storing it in memory as a long text string
    3) Pass the text string containing the script commands to the API that runs the script.  No need to store it in a temporary file.

    Assuming your program is called MyProgram, you command line would be something like:

    C:\Folder\MyProgram.exe "C:\folder\sub_folder\encrypted_script.gms"

    The Global Mapper functionality would be available to your program via the SDK API, so you don't need to run global_mapper.exe.
Sign In or Register to comment.