TPC variables

You can use local variables during the run of the plugin.

This topic describes how to create, update, and use a variable.

To set and update a variable:

Action

Command

Set

Set

Update

Set

Or

Append

 

 

Example:

Init=(script) set curr_pass "<pmpass>";

InitVerifyLogon=(script) set curr_pass "<pmnewpass>";

In this example, the variable curr_pass is set in two different ways:

  • When reaching the Init state, it is set to the current password of the target account
  • When reaching the InitVerifyLogon state, it is set to the new password pf the target account

This is useful for reusing the spawn command. Once for the initial logon, and a second for running a verify after the password was changed.

To use a variable:

Reference a variable by appending the $ character to the name of the variable.

 

Example:

LoginPass=$curr_pass

In this example, the variable curr_pass is sent to the target machine. While the plugin is running, this password can be set to the target account’s current or new password or even to one of the linked account’s passwords, depending on the user that is used to log on to the target.