Protect html,password encrypt source,hide html code - the basics [Home]

Image Protection - how to use Image Guardian

FAQ - protect html , scripts, PHP, ASP

FAQ - protect images

General settings

Profiles and advanced settings

Encrypt ASP files

Ultra - Strong HTML password protection

Encrypt PHP files

Protect css files [Style Sheets]

File List Manager and Command line reference

Site Manager

Known issues & Troubleshooting

Support

Shortcuts

Protect HTML source in command line mode - HTML Guardian command line reference


File List Manager is intended to replace the command line usage of HTML Guardian. However the full command line support is still available and you can use this feature to control HTML Guardian from other applications like your own C, C++, VisualBasic etc. applications and automatically

protect html

/ script / asp / php/ css etc. source code, protect images and perform many other encryption tasks the same way you can do this using the graphical user interface.

HTML Guardian command line syntax has the following structure :

htmlg.exe inputfile, outputfile, [switch1], [switch2]...... Note that the comma ( , ) character is used to separate the options.
htmlg.exe - required. The name of the main HTML Guardian executable. If you call htmlg.exe from another folder(not from the folder where it resides), you should use the full path to it like C:\Program Files\HTML Guardian\htmlg.exe
To be able to call htmlg.exe from within any folder without providing the full path to it, you may simply add the program's installation folder to the PATH environment variable (check the OS help files for instructions how to do this).
inputfile - required parameter. The full path to the file you want to encrypt, like C:\TestSite\default.htm
outputfile - required parameter. The path for saving the encrypted inputfile, including the filename, like C:\TestSite\Encrypted\default.htm

Inputfile and outputfile parameters should be absolute paths. You can not use relative paths , even if the files which source is to be encrypted reside in the same folder where htmlg.exe file resides.

Important: outputfile parameter must be a valid path, it should point to an already existing folder. In the above example, the folder C:\TestSite\Encrypted\ must exist. If the outputfile parameter is invalid (that is, the folder specified for saving the encrypted file does not exist), the file will not be encrypted, it will be skipped.
If inputfile and outputfile parameters are the same, HTML Guardian will overwrite the original file with the encrypted file without prompting you. Please be careful, and always make backup copies of your files before you protect html and other files in command line mode!


All the switches described below are optional. If omitted, the [default..] setting will be used:

IE5 - use alternative encryption method(for IE 5+ only). If omitted, the default method(for all browsers) will be used to protect files.
R - disable right click [default:false - disable right click security option will not be applied]
L - don't show links in status bar [default:false]
T - disable text selection [default:false - disable text copy protection will not be applied]
O - prohibit offline use [default:false (only for asp encryption, the default value is true)]
N - disable page printing [default:false]
C - disable clipboard & print screen (this option will only work for IE 5+ browsers, default: false)
M - encrypt Meta tags.
P@password@redirection - set the password for the page and a redirection URL in case of incorrect password.
 password - the password that the visitor must enter to see the page.
possible values for the redirection part are:
 blank - will display a blank page.
 back - will turn the visitor back to the previous page visited.
 any valid URL, like http://www.protware.com - will redirect the visitor to this url in case of incorrect password.
F@referrer@redirection - set the scope of URL's allowed to link this page, and a redirection URL in case the page is linked from another place.
 referrer - a string that identifies the sites allowed to link this page. Normally that would be your domain name, like protware or protware.com - in this case the protected file can be linked only from within your domain. You may also include a filename here, like http://www.protware.com/features.html, or just protware.com/features.html - in this case, the protected file can be linked from the specified file only.
possible values for the redirection part are:
 blank - will display a blank page.
 any valid URL, like http://www.protware.com - will redirect the visitor to this url in case of incorrect password.

An example of a .bat file:

htmlg.exe C:\siteTest\index.htm, C:\siteTest\Encrypted\index.htm, R, L, O, P@999@back
htmlg.exe C:\Site1\test1.htm, C:\Site1\test1.htm, IE5, R, T, F@protware.com@blank

Copy the lines above, paste them in a text editor such as Notepad, and save the file in HTML Guardian's installation folder with a .bat extension, like my_list.bat. Then just double click this file to start file encryption.

Some of the settings are not available in command line mode, for example you can't change the encryption method for 'All' browsers - all files will be encrypted using the encryption method currently set as default.
Also, the 'Encrypt meta tags' and 'Scramble non-ASCII characters' protection options are not available when you protect html from the command line.

Go back Next

   © 1997-2023, ProtWare Inc. All rights reserved.