<< www.WebFormAntiSpam.com

Contents


Overview
Code protection
File protection
Preferences
Command line options
Batch processing
Additional information
Frequently Asked Questions
Technical Support
Update software
License agreement
Order full version
Trial version reminder
"About" window

Command line options

When command-line mode is useful

You may have your web page in development, making changes from time to time. To have it protected, you will need to run Web Form Anti-Spam for updating protected version of your web page. This can be time consuming, so we have made it possible to run in command mode.

Command line parameters

Running wfas.exe without command line parameters will open it in windowed mode. If there are any command line parameters, it will run in command-line mode.

WFAS /s:<SourceFile> [/t:<TargetFile>] [-(a|e|d)] [/mb:<markbeg>] [/me:<markend>]
  • WFAS Web Form Anti-Spam executable.
    It is in \Program Files\Web Form Anti-Spam\ directory by default.
  • /s: Source file path.
    Required parameter, can be relative or absolute. That file will be loaded and processed accordingly to protection labels markup. If no protection labels will be found, it will be protected totally. If file path contains spaces, it must be enclosed in quotation marks.
  • /t: Target file path.
    Optional parameter, can be relative or absolute. That is where a processed file will be saved. When no target file specified, the source file path will be used as target, overwriting it. If file path contains spaces, it must be enclosed in quotation marks.
  • -a Processing mode: auto-detect.
    This is default mode: when there are no (-a, -e, -d) switches are in command line, auto-detect mode will be assumed. Web Form Anti-Spam can detect the nature of the source file and do decoding if the file is encoded or do encoding if the file is not encoded.
  • -e Processing mode: encode.
    This will force encoding source file. You may want to use that option for protecting code having protected parts, what can increase level of protection.
  • -d Processing mode: decode.
    This will force decoding source file, telling that it is encoded. This option is quite redundant, because Web Form Anti-Spam can detect whether code protected or not. If it cannot, it most probably that it will be unable to decode it too.
  • /mb: Beginning marker.
    With this parameter you can override default marker value ("<!-- WEBFORMANTISPAM BEGIN -->), which will be used when no beginning marker specified in command line. If you have set that marker in preferences, it will be used instead of default when no "/mb:" parameter is in command line.
  • /me: Ending marker.
    With this parameter you can override default marker value ("<!-- WEBFORMANTISPAM END -->), which will be used when no beginning marker specified in command line. If you have set that marker in preferences, it will be used instead of default when no "/me:" parameter is in command line.

Examples

1. Protect file "c:\web\support.htm" and save protected to c:\public web\support.htm:

wfas /s:c:\web\support.htm /t:"c:\public web\support.htm" -e

2. Protect file "c:\web\support.htm" and save protected to c:\public web\support.htm:

wfas /s:c:\web\support.htm /t:"c:\public web\support.htm" -e

3. Protect/unprotect file "c:\web\support.htm" and save protected/unprotected result back to the same file:

wfas /s:c:\web\support.htm
This shortest form is the most powerful. You may protect your file with that command and publish the file to web. When you will need to make changes in protected code, all what you need is to run the same comand just one more time! It will convert file back to unprotected, allowing you to make your changes. Then execute the same command to have protected code again which is safe to be published without fear of spam bots.

4. Process file "c:\web\support.htm" and save processed file back with alternate markup labels:

wfas /s:c:\web\support.htm /mb:<form /me:</form>
This will do the same as example above, but markers are different. This will protect all forms in code.

If you will ever want to protect the same file with different markers, you should execute several commands – one per markers pair. This will need to prevent auto-detection mode, so you will need to specify -e switch.

More advanced tecniques

To learn how also Web Form Anti-Spam can be used in web-mastering, you can visit www.webformantispam.com and refer another topic in this help file: batch processing.