Protect
To protect an application you have two commands: Automate protection
which allows you to automate the process or you can also use an interactive command (Protect an application quickly
) that will accompany you in every step.
Protect an application quickly
The content of this article is also available as a video tutorial.
First steps with the CLI (6 min)This option requires interaction with the console, it is very useful to protect quickly, but not to automate the process.
Use the command:
bytehide shield protect:auto
This command will start an interactive flow asking you for the necessary values to protect your application.
Enter a project name:
Enter the project name: MyCompanyCRM
You must enter the name of a Shield project, if the project does not exist it will be created.
Enter the application path:
Enter the path of the application: "C:\users\company\app\myCRM.dll"
You must enter the
full
path of the application you want to protect.Processing dependencies:
In order to analyze the application correctly, the dependencies it uses must be resolved, Shield will do this automatically for you, in the event that it does not find a dependency on your computer, it will ask you for the path of the dependency.
If you have trouble finding your application's dependencies you can look for the
{your_app_name}.deps.json
file to find out the dependency paths. These are normally found in% userprofile% .nuget \ packages (Windows)
or~ / .nuget / packages (Mac / Linux)
, of the application uses dependencies of.NET Framework
try looking for them in the GAC usingGacUtil.exe
.Select settings:
You must select:
Choose the source of protection to use > Load from a config file Use a preset Make a custom
- If you select it from a file you must enter its
full path
. - If you use a preset, just choose which one.
- If you do it personalized, select the protections you want to apply.
- If you select it from a file you must enter its
Enter the directory where the protected application will be saved:
If the directory does not exist, it will be created. Also, if an application is found in the directory, it will be replaced.
Enter the directory path where protected app will be saved: "C:\users\company\app\protected\myCRM.dll"
Your application will be protected.
While it is protected you will see the process in real time, once it is finished you will be notified.
Automate protection
The content of this article is also available as a video tutorial.
CLI advanced configuration (3 min)It is the same operation as the previous one but you must provide all the arguments at the beginning.
bytehide shield protect <PROJECT> <APPLICATION PATH> <CONFIGURATION PATH> <OUTPUT DIRECTORY PATH>
Where:
<PROJECT>
it will be the name of the shield project, or if you work withproject keys
add the--key
or-k
flag. (If the project does not exist it will be created)<APPLICATION PATH>
it will be the full path of the application, i.e:c:\folder\app.exe
<CONFIGURATION PATH>
it will be the full path of the Shield configuration, i.e:c:\folder\shield.application.app.json.
Read about the settings in: Shield Configurations.OUTPUT DIRECTORY PATH
it will be the directory where the protected application will be savedi.e:c:\folder\protected\
.
An example would be:
bytehide shield protect "myCompany" "c:\folderapp.exe" "c:oldershield.application.app.json" "c:olderprotected"