Summary: A utility for testing and debugging placeholders and functions.
The print Command
The print command is a simple yet powerful utility for testing and debugging placeholders and functions. It takes a string, resolves any placeholders or functions within it, and prints the final result to the console.
Core Use Cases
- Testing Placeholders: Quickly check the value of a placeholder before using it in a complex tool command.
- Transforming Data: Use placeholder functions to encode, decode, or hash data on the fly.
- Debugging: Verify that complex, nested placeholders are being resolved as you expect.
Syntax
The print command supports two main syntaxes:
1. Simple Function Syntax
This is the most common and readable way to use functions.
print b64encode(some text to encode)
print md5($target.name)
2. Bracket and Placeholder Syntax
This syntax is used for resolving complex strings containing multiple placeholders or nested functions.
print "The target is $target.name at $target.ip"
print b64encode(urlencode($target.name))
print $logbook.1 # Prints the entire logbook entry as JSON