WSF_CYBER_SCRIPT_EFFECT_ENHANCED

cyber_effect WSF_CYBER_SCRIPT_EFFECT_ENHANCED
cyber_effect <effect_name> WSF_CYBER_SCRIPT_EFFECT_ENHANCED

   platform_type <type>
      script void Attack(WsfCyberEngagement aEngagement, WsfCyberAttackParameters aParameters) ... end_script
      script void Restore(WsfCyberEngagement aEngagement, WsfCyberAttackParameters aParameters) ... end_script
   end_platform_type

   platform <name>
      script void Attack(WsfCyberEngagement aEngagement, WsfCyberAttackParameters aParameters) ... end_script
      script void Restore(WsfCyberEngagement aEngagement, WsfCyberAttackParameters aParameters) ... end_script
   end_platform

   default
      script void Attack(WsfCyberEngagement aEngagement, WsfCyberAttackParameters aParameters) ... end_script
      script void Restore(WsfCyberEngagement aEngagement, WsfCyberAttackParameters aParameters) ... end_script
   end_default

end_cyber_effect

Overview

WSF_CYBER_SCRIPT_EFFECT_ENHANCED is a cyber_effect that can be defined using the scripting language. This effect is equivalent in functionality with WSF_CYBER_SCRIPT_EFFECT except that it supports the usage of user supplied parameters in the script context provided during the attack call. As a result, the signature of the script method overloads for this effect have been modified to provide these additional parameters.

Note

The functionality of this script effect is expected to replace the standard script effect in AFSIM 3.0.

Note

This effect does NOT require user supplied data during a CyberAttack initiation call. However, this type supports the usage of such data if provided.

Commands

platform_type <type> … end_platform_type

Define the effect scripts for a platform type. This command may be repeated as necessary.

platform <name> … end_platform

Define the effect scripts for a specific platform. This command may be repeated as necessary.

default … end_default

Define the effect scripts for any victim that is not specified by platform or platform_type. This command is only valid once, and multiple instances of this block will only use the last declared instance of this block.

Enhanced Effect Scripts

Two scripts must be defined to implement an effect:

attack
script void Attack(WsfCyberEngagement aEngagement, WsfCyberAttackParameters aParameters)
end_script

The ‘Attack’ script is invoked when the attack has been determined that it will occur. The method should take the necessary actions to cause whatever is needed to implement the effect.

restore
script void Restore(WsfCyberEngagement aEngagement, WsfCyberAttackParameters aParameters)
end_script

The ‘Restore’ script is invoked when it has been determined that the victim has recovered from the attack. The method should take the necessary actions to rescind whatever actions were taken by the Attack script (essentially restoring the platform to the state that existed prior to the attack).

User supplied parameters passed during the attack instantiation are available for usage in the context of these script method overloads.