Brocade Virtual ADX OpenScript API Guide (Supporting ADX v Manuel d'utilisateur Page 128

  • Télécharger
  • Ajouter à mon manuel
  • Imprimer
  • Page
    / 132
  • Table des matières
  • MARQUE LIVRES
  • Noté. / 5. Basé sur avis des utilisateurs
Vue de la page 127
116 Brocade Virtual ADX OpenScript API Guide
53-1003243-01
Methods
9
Example
In the following example, the script changes the maximum match size during payload matching
from the default value of 1024 to 512.
OS_PAYLOAD_INSPECT::disable ()
Disables payload inspection for the current transaction.
Context
This function can be called from any event.
Usage
This API is used for disabling payload inspection within a transaction. For example, a payload
inspection for an HTTP transaction can be disabled in a matched event handler.
Example
use OS_HTTP_RESPONSE;
use OS_PAYLOAD_INSPECT;
sub HTTP_RESPONSE {
if (OS_HTTP_RESPONSE::content_type =~ /text/) {
OS_PAYLOAD_INSPECT::match_size(512);
OS_PAYLOAD_INSPECT::substitute(
‘credit*card=[0-9]{32}’,‘#### ####’,
‘SSN=[0-9]{9}’,‘###-##-####’);
}
}
use OS_HTTP_RESPONSE;
use OS_PAYLOAD_INSPECT;
sub HTTP_RESPONSE {
if (OS_HTTP_RESPONSE::content_type =~ /text/) {
OS_PAYLOAD_INSPECT::substitute(
‘credit*card=[0-9]{32}’,‘#### ####’,
‘SSN=[0-9]{9}’,‘###-##-####’
);
}else {
OS_PAYLOAD_INSPECT::disable();
}
}
Vue de la page 127
1 2 ... 123 124 125 126 127 128 129 130 131 132

Commentaires sur ces manuels

Pas de commentaire