Skip to content

Latest commit

 

History

History
 
 

targeted

Targeted scripts

Scripts that invoked with a target URL and are only run when your start them manually.

JavaScript template

// Targeted scripts can only be invoked by you, the user, e.g. via a right-click option on the Sites or History tabs

/**
 * A function which will be invoked against a specific "targeted" message.
 *
 * @param msg - the HTTP message being acted upon. This is an HttpMessage object.
 */
function invokeWith(msg) {
	// Debugging can be done using println like this
	print('invokeWith called for url=' + msg.getRequestHeader().getURI().toString()); 
}

Parameters

Name JavaDoc
msg HttpMessage

Templates in other languages

Official Videos

ZAP In Ten: Targeted Scripts (10:01)